glitch-javascript-sdk
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -8,2 +8,3 @@ import Auth from "./Auth"; | ||
import Waitlists from "./Waitlist"; | ||
import Posts from "./Posts"; | ||
import Templates from "./Templates"; | ||
@@ -17,2 +18,3 @@ export { Auth }; | ||
export { Waitlists }; | ||
export { Posts }; | ||
export { Templates }; |
@@ -8,2 +8,3 @@ import { Config } from "./config"; | ||
import { Teams } from "./api"; | ||
import { Posts } from "./api"; | ||
import { Templates } from "./api"; | ||
@@ -34,2 +35,3 @@ import { Waitlists } from "./api"; | ||
Teams: typeof Teams; | ||
Posts: typeof Posts; | ||
Templates: typeof Templates; | ||
@@ -36,0 +38,0 @@ Waitlists: typeof Waitlists; |
@@ -1396,2 +1396,53 @@ import { AxiosPromise } from 'axios'; | ||
declare class Posts { | ||
/** | ||
* List all the Posts. | ||
* | ||
* @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList | ||
* | ||
* @returns promise | ||
*/ | ||
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>; | ||
/** | ||
* Create a new post. | ||
* | ||
* @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage | ||
* | ||
* @param data The data to be passed when creating a post. | ||
* | ||
* @returns Promise | ||
*/ | ||
static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>; | ||
/** | ||
* Update a post. | ||
* | ||
* @see https://api.glitch.fun/api/documentation#/Post%20Route/updatePostStorage | ||
* | ||
* @param post_id The id of the post to update. | ||
* @param data The data to update. | ||
* | ||
* @returns promise | ||
*/ | ||
static update<T>(post_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>; | ||
/** | ||
* Retrieve the information for a single post. | ||
* | ||
* @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage | ||
* | ||
* @param post_id The id fo the post to retrieve. | ||
* | ||
* @returns promise | ||
*/ | ||
static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>; | ||
/** | ||
* Deletes a post. | ||
* | ||
* @see https://api.glitch.fun/api/documentation#/Post%20Route/destoryPostStorage | ||
* | ||
* @param post_id The id of the post to delete. | ||
* @returns promise | ||
*/ | ||
static delete<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>; | ||
} | ||
declare class Templates { | ||
@@ -1670,2 +1721,3 @@ /** | ||
Teams: typeof Teams; | ||
Posts: typeof Posts; | ||
Templates: typeof Templates; | ||
@@ -1672,0 +1724,0 @@ Waitlists: typeof Waitlists; |
{ | ||
"name": "glitch-javascript-sdk", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Javascript SDK for Glitch", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -8,2 +8,3 @@ import Auth from "./Auth"; | ||
import Waitlists from "./Waitlist"; | ||
import Posts from "./Posts"; | ||
import Templates from "./Templates"; | ||
@@ -19,2 +20,3 @@ | ||
export {Waitlists}; | ||
export {Posts}; | ||
export {Templates}; |
@@ -12,2 +12,3 @@ | ||
import { Teams } from "./api"; | ||
import { Posts } from "./api"; | ||
import {Templates} from "./api"; | ||
@@ -46,2 +47,3 @@ import { Waitlists } from "./api"; | ||
Teams: Teams, | ||
Posts: Posts, | ||
Templates : Templates, | ||
@@ -48,0 +50,0 @@ Waitlists: Waitlists |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2174121
96
54169