Giter Site home page Giter Site logo

1010uk's Introduction

10:10 Hackday API Hackery CURL notes

Adding a value:
curl -F key=your_api_key -F start_date=2010-10-04 -F end_date=2010-11-04 -F energy_kwh=123.45 -F category=electricity http://my.1010uk.org/api/profile/energy/electricity

Deleting a value by id:
curl -i -X DELETE http://my.1010uk.org/api/profile/energy/electricity/your_json_object_id?key=your_api_key

Editing a value by id:
curl -i -v -H "Content-Type:application/json" --upload-file ./your_json_object_id.json http://comments.latest.my-1010.appspot.com/api/profile/energy/electricity/your_json_object_id?key=your_api_key

n.b change  "http://comments.latest.my-1010.appspot.com" back to  "http://my.1010uk.org/" when the code edits have been published to the production server.

curl -i -v --header "Content-Type: application/json" --upload-file ./your_json_object_id http://my.1010uk.org/api/profile/energy/electricity/your_json_object_id?key=your_api_key

Getting JSON object element by id:
curl -i -X GET http://my.1010uk.org/api/profile/energy/electricity/your_json_object_id?key=your_api_key

Getting the entire JSON object i.e. all id's:
curl -i -X GET http://my.1010uk.org/api/profile/energy/electricity?key=your_api_key

1010uk's People

Contributors

samthetechie avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

centaurustech

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.