Code Monkey home page Code Monkey logo

path-client's Introduction

path-client

An unofficial Path API and web client.

Installation

git clone https://github.com/sbekti/path-client.git
npm install
npm start

Open your REST API browser (e.g. Postman) at http://localhost:5000.

REST APIs

Authentication

POST /api/v1/authenticate

Send your credentials as a JSON on the request body. Don't forget to use Content-Type: application/json.

{
  "username": "your_login_email_address",
  "password": "your_password"
}

You will get a JSON containing your oauth_token. This token will be used to access the other APIs.

Home Feed

GET /api/v1/feed/home

Parameters:

Query Parameter Remarks
oauth_token Your oauth_token from /api/v1/authenticate.
limit Limit the number of returned posts. If not specified, the default value is 20.
newer_than Only return posts that are newer than the specified timestamp. Must be a valid UNIX timestamp in seconds. May contain milliseconds up to 6 decimal points.
older_than Only return posts that are older than the specified timestamp. Must be a valid UNIX timestamp in seconds. May contain milliseconds up to 6 decimal points.

User Feed

GET /api/v1/feed/user

Parameters:

Query Parameter Remarks
oauth_token Your oauth_token from /api/v1/authenticate.
user_id The user_id of the target user.
limit Limit the number of returned posts. If not specified, the default value is 24.
newer_than Only return posts that are newer than the specified timestamp. Must be a valid UNIX timestamp in seconds. May contain milliseconds up to 6 decimal points.
older_than Only return posts that are older than the specified timestamp. Must be a valid UNIX timestamp in seconds. May contain milliseconds up to 6 decimal points.

Location Update (Arrived In)

POST /api/v1/location/update
{
  "oauth_token": "your_oauth_token",
  "lat": 0.000000,
  "lng": 0.000000,
  "accuracy": 16.0,
  "elevation": 0.0
}
JSON Key Remarks
oauth_token Your oauth_token from /api/v1/authenticate.
lat Latitude up to 6 decimal points.
lng Longitude up to 6 decimal points.
accuracy Accuracy in unknown units. Just put 16.0 to be safe.
elevation Elevation in meters. Use 1 decimal point (e.g. 0.0).

This project is not complete yet!

path-client's People

Contributors

sbekti avatar

Watchers

James Cloos avatar  avatar

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.