Skip to content

PlacewiseMedia/placewise-api-sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

placewise-api-sdk-js

Official Javascript client for Placewise Media's REST API (v.12+).

Usage:

var Client = require('./client.js');
var client = new Client('[email protected]', '<your password goes here>');

client.get('malls/123', { include: 'stores' }).then(function()
  console.log(client.repo.malls[0]);  // { id: '1066',
                                      //   type: 'malls',
                                      //   links: { self: 'https://api.placewise.com/malls/1066' },
                                      //   attributes:
                                      //   { name: 'City Shopping Center 10',
                                      //     sort_name: 'City Shopping Center 10',
                                      //     seo_slug: 'denver-co',
                                      //     nick_name: 'city10',
                                      //     address: '1390 Lawrence St. #300',
                                      //     city: 'Denver',
                                      //     state: 'CO'...

  console.log(client.repo.stores[0]); //  { id: '2128839873',
                                      //    type: 'stores',
                                      //    links: { self: 'https://api.placewise.com/stores/2128839873' },
                                      //    attributes:
                                      //     { name: 'Trendy & Co.',
                                      //       sort_name: 'Trendy & Co.',
                                      //       seo_slug: 'trendy-and-co'...
});

client.get('malls/123/deals').then(function) {
  console.log(client.repo.deals[0]);  //  { id: '2127993272',
                                      //    type: 'deals',
                                      //    links: { self: 'https://api.placewise.com/deals/2127993272' },
                                      //    attributes:
                                      //     { sales_type: 'Sales and Promos',
                                      //       title: 'Big Savings',
                                      //       seo_slug: 'big-savings',
                                      //       name: 'Trendy & Co.',
});

About

Official JavaScript SDK for Placewise REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published