fix file name
well, this is friday afternoon...
This commit is contained in:
parent
498dc9523f
commit
cff7833373
1 changed files with 42 additions and 38 deletions
|
@ -1,12 +1,12 @@
|
||||||
# TwingleCampaign API
|
# TwingleForm API
|
||||||
|
|
||||||
The TwingleCampaign API is meant to offer a simple and secure interface to read and alter only a limited number of
|
The TwingleForm API is meant to offer a simple and secure interface to read and alter only a limited number of values
|
||||||
values provided by the TwingleProject API.
|
provided by the TwingleProject API.
|
||||||
|
|
||||||
It can be used by external CMS (like Drupal) to receive a list of TwingleProjects. The API delivers for example the
|
It can be used by external CMS (like Drupal) to receive a list of TwingleProjects. The API delivers for example the
|
||||||
embed codes of all active TwingleProjects so that they can be integrated in a website.
|
embed codes of all active TwingleProjects so that they can be integrated in a website.
|
||||||
|
|
||||||
It's also possible to update the TwingleProject `url` field via the TwingleCampaign Create API. In this case the `url`
|
It's also possible to update the TwingleProject `url` field via the TwingleForm Create API. In this case the `url`
|
||||||
fields of all TwingleCampaign children of the TwingleProject will be updated, too.
|
fields of all TwingleCampaign children of the TwingleProject will be updated, too.
|
||||||
|
|
||||||
## Get & Getsingle API
|
## Get & Getsingle API
|
||||||
|
@ -23,59 +23,63 @@ fields of all TwingleCampaign children of the TwingleProject will be updated, to
|
||||||
|**twingle_project_type**|no |project type can be *default*, *event* or *membership*|default |
|
|**twingle_project_type**|no |project type can be *default*, *event* or *membership*|default |
|
||||||
|
|
||||||
### Example Get call
|
### Example Get call
|
||||||
|
|
||||||
```curl
|
```curl
|
||||||
curl --location -g --request GET 'http://dmaster.localhost:7979/sites/all/modules/civicrm/extern/rest.php?entity=TwingleForm&action=get&api_key=xxxxxxxxxxxxxxxxxxxx&key=xxxxxxxxxxxxxxxxxxxx&json={}'
|
curl --location -g --request GET 'http://dmaster.localhost:7979/sites/all/modules/civicrm/extern/rest.php?entity=TwingleForm&action=get&api_key=xxxxxxxxxxxxxxxxxxxx&key=xxxxxxxxxxxxxxxxxxxx&json={}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Response for successful Get call
|
### Response for successful Get call
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"is_error": 0,
|
"is_error": 0,
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"count": 2,
|
"count": 2,
|
||||||
"values": {
|
"values": {
|
||||||
"16": {
|
"16": {
|
||||||
"id": "16",
|
"id": "16",
|
||||||
"twingle_project_id": "3237",
|
"twingle_project_id": "3237",
|
||||||
"title": "Donation Form",
|
"title": "Donation Form",
|
||||||
"name": "Donation_Form",
|
"name": "Donation_Form",
|
||||||
"project_type": "default",
|
"project_type": "default",
|
||||||
"embed_code": "<!-- twingle --> ... <!-- twingle -->",
|
"embed_code": "<!-- twingle --> ... <!-- twingle -->",
|
||||||
"counter": "https://donationstatus.twingle.de/donation-status/xxxxxxxxxxxx"
|
"counter": "https://donationstatus.twingle.de/donation-status/xxxxxxxxxxxx"
|
||||||
},
|
},
|
||||||
"23": {
|
"23": {
|
||||||
"id": "23",
|
"id": "23",
|
||||||
"twingle_project_id": "3242",
|
"twingle_project_id": "3242",
|
||||||
"title": "Another Donation Form",
|
"title": "Another Donation Form",
|
||||||
"name": "Donation_Form_Copy",
|
"name": "Donation_Form_Copy",
|
||||||
"project_type": "event",
|
"project_type": "event",
|
||||||
"embed_code": "<!-- twingle --> ... <!-- twingle -->",
|
"embed_code": "<!-- twingle --> ... <!-- twingle -->",
|
||||||
"counter": "https://donationstatus.twingle.de/donation-status/xxxxxxxxxxxx"
|
"counter": "https://donationstatus.twingle.de/donation-status/xxxxxxxxxxxx"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example Getsingle call
|
### Example Getsingle call
|
||||||
|
|
||||||
```curl
|
```curl
|
||||||
curl --location -g --request GET 'http://dmaster.localhost:7979/sites/all/modules/civicrm/extern/rest.php?entity=TwingleForm&action=getsingle&api_key=xxxxxxxxxxxxxxxxxxxx&key=xxxxxxxxxxxxxxxxxxxx&json={%22id%22:16}' \
|
curl --location -g --request GET 'http://dmaster.localhost:7979/sites/all/modules/civicrm/extern/rest.php?entity=TwingleForm&action=getsingle&api_key=xxxxxxxxxxxxxxxxxxxx&key=xxxxxxxxxxxxxxxxxxxx&json={%22id%22:16}' \
|
||||||
```
|
```
|
||||||
|
|
||||||
### Response for successful Getsingle call
|
### Response for successful Getsingle call
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"is_error": 0,
|
"is_error": 0,
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"count": 7,
|
"count": 7,
|
||||||
"values": {
|
"values": {
|
||||||
"id": "16",
|
"id": "16",
|
||||||
"twingle_project_id": "3237",
|
"twingle_project_id": "3237",
|
||||||
"title": "Donation Form",
|
"title": "Donation Form",
|
||||||
"name": "Donation_Form",
|
"name": "Donation_Form",
|
||||||
"project_type": "default",
|
"project_type": "default",
|
||||||
"embed_code": "<!-- twingle --> ... <!-- twingle -->",
|
"embed_code": "<!-- twingle --> ... <!-- twingle -->",
|
||||||
"counter": "https://donationstatus.twingle.de/donation-status/xxxxxxxxxxxx"
|
"counter": "https://donationstatus.twingle.de/donation-status/xxxxxxxxxxxx"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue