CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Getting Event Fee(s) through API
Pages: [1]

Author Topic: Getting Event Fee(s) through API  (Read 1146 times)

pbarmak

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 3
  • CiviCRM version: 3.3.5
  • CMS version: Pressflow 6.19
  • MySQL version: 5.1
  • PHP version: 5.2.10
Getting Event Fee(s) through API
February 09, 2011, 10:48:01 am
Is there a way to get the fees for an event through the API?  I couldn't find anything for this.  We have events that have a single fee/cost and we'd like to list out the events on a web page with their associated fees.  Is there a separate Event Fee get call somewhere?

Thanks.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Getting Event Fee(s) through API
February 09, 2011, 12:22:11 pm
unfortunately I don't think that's there at the moment .. let us know if you interested in helping to write it...
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Getting Event Fee(s) through API
February 09, 2011, 11:28:44 pm
There are instructions in the CiviCRM wiki on how to migrate / create a V3 API. If you would need any instruction or help in writing a V2 API (PriceSet.php?) let us know....assuming obviously that you are familiar with PHP
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

pbarmak

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 3
  • CiviCRM version: 3.3.5
  • CMS version: Pressflow 6.19
  • MySQL version: 5.1
  • PHP version: 5.2.10
Re: Getting Event Fee(s) through API
February 10, 2011, 06:43:11 am
Thank you both.  It sounds like writing a v3 API is the better long-term option, I'll look into that at some point (we're in the middle of a "big" launch at the moment).  For now, I just added some quick DB queries to our custom Event API to pull in the default fee for an event and throw it into the output field set.  I'll look into writing something more appropriate/extensible for v3.

Oh, one side question - with the v3 API, will we have the ability to create custom API files and put them in our custom PHP folder structure?  That would be a huge plus as we have a couple of customizations to the API files and have to keep remembering to re-copy them during Civi upgrades.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Getting Event Fee(s) through API
February 10, 2011, 06:53:04 am
I know the feeling, I hate the copying around....and I always seem to forget one :-) Unfortunately we did not take that on board for V3, time constraints, there is only so many things you can do in one day and more of that....
Next version?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Getting Event Fee(s) through API
February 10, 2011, 07:07:35 am
Hi,

This being said, now that all the api requests are going to be through a unique civicrm_api, that will be much easier to add.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Getting Event Fee(s) through API
February 10, 2011, 07:54:47 am
Ever so true! Almost forgot about that.....must be all the warm beer
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Getting Event Fee(s) through API

This forum was archived on 2017-11-26.