1.0.0 • Published 8 years ago

flatties_api v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
8 years ago

flatties_api

FlattiesApi - JavaScript client for flatties_api Flatties services. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0-rc1
  • Package version: 1.0.0-rc1
  • Build date: 2016-10-21T22:51:39.468Z
  • Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install flatties_api --save

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/flatties_api then install it via:

    npm install YOUR_USERNAME/flatties_api --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var FlattiesApi = require('flatties_api');

var defaultClient = FlattiesApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: flatties_auth
var flatties_auth = defaultClient.authentications['flatties_auth'];
flatties_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new FlattiesApi.ListingApi()

var opts = { 
  'limit': 56, // {Integer} An optional number listings that are returned in each page. If zero or less, a default limit is used. Note that this is an upper limit. If there are not enough listings remaining in the list, then fewer will be returned.
  'start': "start_example" // {String} An optional cursor that points to the starting page of data. Typically obtained from a previous call.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAllListings(opts, callback);

Documentation for API Endpoints

All URIs are relative to https://endpoints-dot-flatties-test01.appspot.com/v1

ClassMethodHTTP requestDescription
FlattiesApi.ListingApigetAllListingsGET /listings/allGet all listings.
FlattiesApi.ListingApigetListingGET /listings/{listingId}Get listing details.
FlattiesApi.ListingApigetListingsGET /listingsGet listings in the vicinity of the specified location.
FlattiesApi.ListingApigetListingsByTileKeyGET /listings/byTileKeyGet listings in the tile represented by the specified tile key.
FlattiesApi.ListingApiremoveListingDELETE /listings/{listingId}Delete a listing.
FlattiesApi.ListingApiupdateListingPUT /listings/{listingId}Update an existing listing.
FlattiesApi.UserApiaddListingPOST /user/{userId}/listingsAdd a new listing to the user's listings.
FlattiesApi.UserApigetTestUsersGET /users/testGet a list of test users.
FlattiesApi.UserApigetUserGET /user/meUser profile
FlattiesApi.UserApigetUserListingsGET /user/{userId}/listingsGet a user's listings.
FlattiesApi.UserApiloginUserPOST /user/loginLogin a user and add the user if new.

Documentation for Models

Documentation for Authorization

flatties_auth

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: Not used
  • Scopes:
    • apptank: Perform actions on behalf of the Apptank organization.
    • user: Perform actions on behalf of an individual user.