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) »
  • Add to documentation : Custom Data values with Contact API
Pages: [1]

Author Topic: Add to documentation : Custom Data values with Contact API  (Read 2076 times)

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
Add to documentation : Custom Data values with Contact API
May 28, 2010, 08:33:16 am
Hi,
I need to add a couple of lines to the API documentation, to explain how to get custom data values with the civicrm_contact_get function of the contact API. Can I get access?
Erik
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: Add to documentation : Custom Data values with Contact API
June 01, 2010, 06:43:08 am
Hi,

You mean on the wiki ? Create an account if you don't have one already and feel free to update.

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: Add to documentation : Custom Data values with Contact API
June 01, 2010, 06:44:36 am
I have an account, but do not seem to be able to update the 'official' Documentation, although I can post and edit on the wiki. I'll give it another go...
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add to documentation : Custom Data values with Contact API
June 01, 2010, 10:25:11 am

we've frozen the 3.1 docs and all changes are now happening in the 3.2 doc space (change CRMDOC to CRMUPCOMING)

this is primarily because confluence does not have a good version control system

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

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: Add to documentation : Custom Data values with Contact API
June 01, 2010, 11:23:44 pm
I figured it out, and updated the 3.2. documentation. Makes sense, I could have figured that out earlier  ;D
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Add to documentation : Custom Data values with Contact API
June 08, 2010, 06:46:08 pm
Hi,

I'm wondering if the API functions should include something like an 'interrogate' function for each class. i.e. a function that would return an array of all the possible values. Some would be DB specific e.g.

$params['custom_23']

and others would have to be added as a form of documentation e.g.

$params['dedupe_check']


It's just a variant of documentation I suppose but it makes it easy when coding. The Get functions don't currently return empty values for all the possibilities do they?
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: Add to documentation : Custom Data values with Contact API
June 08, 2010, 11:13:19 pm
Hi Eileen,
I am not sure I get what you are trying to achieve, can you elaborate a little?
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Add to documentation : Custom Data values with Contact API
June 08, 2010, 11:20:19 pm
I guess the question I have is:

How do you know what values can be passed to the api functions. You send in a $params array but ideally there would be an easy way to find out what values that array can / should hold. I don't think there is and I don't think there is much other then examples to go by.

Since documentation is hard to write & keep up-to-date it would be ideal if there was a way that was somewhat self-documenting
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: Add to documentation : Custom Data values with Contact API
June 08, 2010, 11:24:10 pm
I agree, that would be very useful! Now let me see, where did I leave my spare time stock.....:-)
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: Add to documentation : Custom Data values with Contact API
June 17, 2010, 02:19:00 am
That's a bit of a hit or miss indeed.

Tip: Use the ajax interface, so you play directly with the url and that's easier to test/debug.

I can't see easily a way of generating all the possible param values (on the search for instance you have dozens). Something that would be a good first step is to be able to add a &debug=1 mode, that at least tell you when one of the params you have isn't recognized instead of silently being ignored.

Otherwise, the tests are a good source of examples, and if the specific ones you use is missing, that would be great that you add it, both as a way of expending the doc, and be sure it works the way you want on the next version.

Quote from: Eileen on June 08, 2010, 11:20:19 pm

How do you know what values can be passed to the api functions. You send in a $params array but ideally there would be an easy way to find out what values that array can / should hold. I don't think there is and I don't think there is much other then examples to go by.

Since documentation is hard to write & keep up-to-date it would be ideal if there was a way that was somewhat self-documenting
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Add to documentation : Custom Data values with Contact API
June 17, 2010, 02:21:32 am
Hi Xavier,

I have been writing something that I hope will be the starting point for the pledge API - although it needs tidying.

I was looking at adding an 'interrogate' or 'discover' function as it is useful for what I am doing (using migrate module to import pledges & associated contributions).
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Add to documentation : Custom Data values with Contact API

This forum was archived on 2017-11-26.