Skip to content
Snippets Groups Projects
Commit ac17ad83 authored by Erich's avatar Erich Committed by GitHub
Browse files

Merge pull request #3 from civicrm/master

merge from core
parents 76c6d8fd 3b26db1a
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ Used for autocomplete lookups by the
Returns the options for a specified field e.g.
```php
civicrm_api3(
'contact',
'Contact',
'getoptions',
array('field' => 'gender_id')
);
......
......@@ -23,7 +23,7 @@ See [api/v3/examples] within the core source code for a plethora of examples
Note that there are a few supported syntaxes:
```php
civicrm_api('Contact', 'Create', array(
civicrm_api('Contact', 'create', array(
'version' => 3,
'contact_type' => 'Individual',
'display_name' => 'BA Baracus',
......@@ -34,7 +34,7 @@ civicrm_api('Contact', 'Create', array(
is the same as
```php
civicrm_api('Contact', 'Create', array(
civicrm_api('Contact', 'create', array(
'version' => 3,
'contact_type' => 'Individual',
'display_name' => 'BA Baracus',
......@@ -46,7 +46,7 @@ If you have 2 websites to create you can pass them as ids after the `.`
or an array
```php
civicrm_api('Contact', 'Create', array(
civicrm_api('Contact', 'create', array(
'version' => 3,
'contact_type' => 'Individual',
'display_name' => 'BA Baracus',
......@@ -58,7 +58,7 @@ civicrm_api('Contact', 'Create', array(
or
```php
civicrm_api('Contact', 'Create', array(
civicrm_api('Contact', 'create', array(
'version' => 3,
'contact_type' => 'Individual',
'display_name' => 'BA Baracus',
......
......@@ -25,22 +25,22 @@ or by ID.
Example without sequential:
```php
$result = civicrm_api('UFMatch', 'Get', array(
$result = civicrm_api('UFMatch', 'get', array(
'version' => 3,
'uf_id' => $user->uid,
));
$contactid = $contact['values'][$result['id']]['contact_id'];
$contactId = $result['values'][$result['id']]['contact_id'];
```
Example with sequential:
```php
$result = civicrm_api('UFMatch', 'Get', array(
$result = civicrm_api('UFMatch', 'get', array(
'version' => 3,
'uf_id' => $user->uid,
'sequential' => 1,
));
$contactid = $result['values'][0]['contact_id'];
$contactId = $result['values'][0]['contact_id'];
```
Note that a single record is returned in this example - whenever a single
......@@ -60,7 +60,7 @@ The maximum number of records to return
Example:
```php
civicrm_api('UFMatch', 'Get', array(
civicrm_api('UFMatch', 'get', array(
'version' => 3,
'uf_id' => $user->uid,
'options' => array(
......@@ -82,7 +82,7 @@ The numerical offset of the first result record
Example:
```php
civicrm_api('UFMatch', 'Get', array(
civicrm_api('UFMatch', 'get', array(
'version' => 3,
'uf_id' => $user->uid,
'options' => array(
......@@ -157,7 +157,7 @@ field.
Example:
```php
civicrm_api('contact', 'create', array(
civicrm_api('Contact', 'create', array(
'version' => 3,
'contact_type' => 'Individual',
'first_name' => 'Jeffrey',
......@@ -189,7 +189,7 @@ field.
Example:
```php
civicrm_api('contact', 'create', array(
civicrm_api('Contact', 'create', array(
'version' => 3,
'contact_type' => 'Individual',
'first_name' => 'Jeffrey',
......
......@@ -63,7 +63,7 @@ This is the most common way to call the API.
```php
try {
$contacts = civicrm_api3('contact', 'get', array(
$contacts = civicrm_api3('Contact', 'get', array(
'first_name' => 'Alice',
'last_name' => 'Roberts',
));
......
......@@ -19,8 +19,10 @@ We are using [mkdocs](http://www.mkdocs.org) to produce guides, and currently
have the following two:
- [User Guide](https://docs.civicrm.org/user/en/stable/)
- [Developer Guide](https://docs.civicrm.org/dev/en/master/) *(which you are
reading now!)*
([repository](https://github.com/civicrm/civicrm-docs))
- [Developer Guide](https://docs.civicrm.org/dev/en/master/)
([repository](https://github.com/civicrm/civicrm-dev-docs))
*(which you are reading now!)*
The content for each of these guides is written in [markdown], stored in text
files, and hosted on GitHub.
......@@ -32,7 +34,8 @@ However, for a better editing experience we highly recommend installing
`mkdocs` as follows.
1. Obtain the source files for the guide you want to edit
1. Find the repository on GitHub (see bottom left of screen)
1. Find the repository on GitHub (see "repository" links above, or the "GitHub" link on the bottom left
of screen of the documentation you are reading)
1. Fork and clone locally.
1. Install mkdocs on your machine.
1. For Ubuntu
......
......@@ -13,7 +13,9 @@ language is useful for:
[GitHub]: https://github.com
Markdown language is mostly consistent across these platforms, but some
discrepancies do exist and should be noted below.
discrepancies do exist. The `mkdocs` specific guide for markdown, as used in
this book is
[here](http://www.mkdocs.org/user-guide/writing-your-docs).
## Basics
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment