Files
DefinitelyTyped/pinterest-sdk/pinterest-sdk-tests.ts
Adam Burmister 7c67406676 Tidy
2016-01-11 15:44:12 -08:00

18 lines
519 B
TypeScript

/// <reference path="pinterest-sdk.d.ts" />
// Examples from https://github.com/pinterest/pinterest-api-demo
const PIN_FIELDS = "id,name,image[small]";
const PIN_SCOPE = "read_public, write_public";
const CALLBACK = (...args: any[]) => {};
const DATA = { board: "test", note: "test", link: "tets", image_url: "test" };
// Auth
PDK.login({ scope : PIN_SCOPE }, CALLBACK);
PDK.logout();
PDK.getSession();
// Requests
PDK.request("/pins/", "POST", DATA, CALLBACK);
PDK.me("boards", { fields: PIN_FIELDS }, CALLBACK);