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 (Moderator: Donald Lobo) »
  • API Return values has been changed on 2.2.7
Pages: [1]

Author Topic: API Return values has been changed on 2.2.7  (Read 981 times)

ruid

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 4
API Return values has been changed on 2.2.7
July 13, 2009, 04:45:28 pm
I noticed that the format of API returned values has been changed after I upgraded to 2.2.7.

For example, civicrm_contact_get() was return something like these
Code: [Select]
array (
  'contact_id'            => '310764',
  'contact_type'          => 'Individual',
  'sort_name'             => 'Doe, John',
  'display_name'          => ' John  Doe  ',
  'do_not_email'          => '0',
  'do_not_phone'          => '0',
  'do_not_mail'           => '0',
  'do_not_trade'          => '0',
  'is_opt_out'            => '0',
  'preferred_mail_format' => 'Both',
  'first_name'            => 'John',
  'last_name'             => 'Doe',
  'is_deceased'           => '0',
  'address_id'            => '284918',
  'country_id'            => '1228',
  'country'               => ' United States',
  'email_id'              => '296579',
  'email'                 => 'john.doe@email.com',
  'on_hold'               => '0',
)


But now, it returns
Code: [Select]
array ( 310764=>
    array (
      'contact_id'            => '310764',
      'contact_type'          => 'Individual',
      'sort_name'             => 'Doe, John',
      'display_name'          => ' John  Doe  ',
      'do_not_email'          => '0',
      'do_not_phone'          => '0',
      'do_not_mail'           => '0',
      'do_not_trade'          => '0',
      'is_opt_out'            => '0',
      'preferred_mail_format' => 'Both',
      'first_name'            => 'John',
      'last_name'             => 'Doe',
      'is_deceased'           => '0',
      'address_id'            => '284918',
      'country_id'            => '1228',
      'country'               => ' United States',
      'email_id'              => '296579',
      'email'                 => 'john.doe@email.com',
      'on_hold'               => '0',
    )
)

 

ruid

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 4
Re: API Return values has been changed on 2.2.7
July 13, 2009, 05:16:29 pm
From the development team, the API was updated from 2.2.3.

The old format data can be get through civicrm_contact_get(&$params, ture).

ruid

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 4
Re: API Return values has been changed on 2.2.7
July 13, 2009, 05:17:06 pm
Difference can be found here.
http://fisheye.civicrm.org/browse/CiviCRM/branches/v2.2/api/v2/Contact.php?r1=21021&r2=20395&u=3&ignore=&k=

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: API Return values has been changed on 2.2.7
July 13, 2009, 08:11:42 pm

just a clarification that this change was made and supported by the API community team :) the core team just facilitates (and debugs) api changes :)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • API Return values has been changed on 2.2.7

This forum was archived on 2017-11-26.