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) »
  • Address, Email, Phone and Website API introduced in v3 API, Location obsolete
Pages: [1]

Author Topic: Address, Email, Phone and Website API introduced in v3 API, Location obsolete  (Read 1007 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
Address, Email, Phone and Website API introduced in v3 API, Location obsolete
March 16, 2011, 06:11:27 am
Hi all,
as mentioned before in a forum post, Location API is obsolete in API v3. There is still a Location.php file, but this will just return an error with the message
Quote
The Location API is obsolete, use the Address/Phone/Email/Website API instead
.

Instead there are now a number of API's in v3: Address, Email, Phone and Website. Each of them has the functions create, delete and get. There are two ways in which you can do an update:
  • direct call of the civicrm_api3_create_xxxxx function with id in the parameter list
[li]preferred: use the civicrm_api wrapper and do a call civicrm like so: [/li][/list]
Code: [Select]
$result = civicrm_api( 'Phone','Update',$params );
    [/li]

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: Address, Email, Phone and Website API introduced in v3 API, Location obsolete
March 16, 2011, 06:28:30 am
Great! The only big API left on the road to fix is the relationship.

Any taker ?

X+
-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: Address, Email, Phone and Website API introduced in v3 API, Location obsolete
March 16, 2011, 05:25:42 pm
Just in time - I have to migrate in a bunch of emails!
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) »
  • Address, Email, Phone and Website API introduced in v3 API, Location obsolete

This forum was archived on 2017-11-26.