https://github.com/feusebio/restful-api-request
RESTful-API-Request is a simple Lib to talk with API Rest
https://github.com/feusebio/restful-api-request
api client-api custojusto http-requests request rest-api restful
Last synced: about 1 month ago
JSON representation
RESTful-API-Request is a simple Lib to talk with API Rest
- Host: GitHub
- URL: https://github.com/feusebio/restful-api-request
- Owner: feusebio
- License: mit
- Created: 2017-02-13T15:24:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-28T12:00:19.000Z (almost 9 years ago)
- Last Synced: 2024-04-24T04:11:51.198Z (almost 2 years ago)
- Topics: api, client-api, custojusto, http-requests, request, rest-api, restful
- Language: PHP
- Size: 51.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://packagist.org/packages/feusebio/restful-api-request)
[](https://packagist.org/packages/feusebio/restful-api-request)
[](https://packagist.org/packages/feusebio/restful-api-request)
# ApiRestClient
**ApiRestClient is a simple Lib to talk with API Rest.**
This project was created to communicate with API CustoJusto.pt, by security reasons some data was omited.
The user is free to use and make changes to communicate with other API.
- Use Httpful Rest Client Lib (http://phphttpclient.com/)
- Use most popular HTTP methods (GET/POST/UPDATE/DELETE)
- Do CRUD operations
Examples with CURL:
curl -i -X POST "https://api......./v0/entries" -H "Authorization: Token token=XxxXXxxXxXXX" -H "Content-Type: application/json" -d '
{
"title": "Escritório com 250m2 no Marquês",
"description": "Fabuloso escritório com 250m2 no centro de Lisboa com ótimos acessos...",
"type_id": "sell",
"category_id": 1020,
"image_ids": [13123123, 3123123, 231232, 2345356, 7867867],
"location": {
"region_id": 14,
"zipcode": "1000",
"area_id": 220
},
"partner_info": {
"ad_id": "7",
"group_id": "gg-45"
},
"parameters": {
"rooms": 6,
"size": 25
}
}'
Getting Data
curl -i -X GET "https://apidev......./v0/types" -H "Authorization: Token token=XxxXXxxXxXXX"
List an entry
curl -i -X GET "https://apidev....../v0/entries/12495697" -H "Authorization: Token token=XxxXXxxXxXXX"