2.10.0 • Published 7 months ago

@youon/posts-api-wrapper v2.10.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

POSTS API WRAPPER

const { PostsApiClient } = require('@youon/posts-api-wrapper');
window.PostsApiClient = require('@youon/posts-api-wrapper').PostsApiClient;
import { PostsApiClient } from '@youon/posts-api-wrapper';

const endpoints = new PostsApiClient("host",1,"key","token");

Initial config

these params are passed in the constructor of VideoApiClient

ParamDescription
HostApi Host endpoint
VersionApi Version
apiKeyApi Key Available on Accounts APP
apiTokenApi Token Available on Accounts APP

Methods

getCollections(params = null) 
getCollectionsSearch(params = null) 
getCollection(collectionId, params = null) 
getCollectionbyLanguage(collectionId, languageId, params = null) 
getCollectionAuthors(collectionId, params = null) 
getCollectionDossierAuthors(collectionId, dossierId, params = null) 
getCollectionPosts(collectionId, params = null) 
getCollectionDossiers(collectionId, params = null) 
getCollectionDossiersSearch(collectionId, params = null) 
getDossiersSearch(dossierId, params = null) 
getCollectionDossier(collectionId, dossierId, params = null) 
getCollectionDossierbyLanguage(collectionId, dossierId, params = null)  
getDossierCollections(dossierId, params = null) 
getCollectionDossierPosts(collectionId, dossierId, params = null) 
getAuthors(params = null) 
getAuthorsSearch(params = null) 
getAuthor(authorId, params = null) 
getAuthorPosts(authorId, params = null)   
getAuthorCollections(authorId, params = null) 
getAuthorDossiers(authorId, params = null) 
getPostsSearch(params = null) 
getPosts(params = null) 
getPreview(params = null) 
getPost(postId, params = null) 
getDossierPosts(dossierId, params = null) 
getCollectionDossierPostsSearch(collectionId, dossierId, params = null) 
getCollectionDossierPost(collectionId, dossierId, postId, params = null)
getCollectionDossierPostbyLanguage(collectionId, dossierId, postId, params = null)
getStickerGroups(params = null)
getGroupStickers(groupId, params = null)
getRelatedPosts(postId, params = null) 

Params

the params argument is an object that is transformed into a query

type Params = {[key:string]:any}

{ 
    include: "stickers,bodies,tags,photos,albums,authors,labels,audios,documents",
    filter[name]: "Vicente",
    filter[isoLanguage]: "pt,en",
    filter[author.variants.value]: 666,
    filter[author.publicId]: 666666,
    filter[dossier.publicId]: 666666,
    filter[post.publicId]: 666666,
    filter[custom_url]: "url-post",
    filter[sticker]: '89da5e82f4',
    sort: "-id,sticker.position",
    page: 1,
    per_page: 6
}
//&filter[isoLanguage]=pt,en&filter[tags.name]=tag&filter[createdAt][gte|lte]=2021-03-24T10:46:03
//&sort=id|-id|createdAt|-updatedAt
//&include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents
URIDescriptionQuery parametersNotes
getCollections(params = null)Return Collection listfilterisoLanguage=pt,en
getCollectionsSearch(params = null)Return Collection list searchfilterisoLanguage=pt,en&filtername=xpto
getCollection(collectionId, params = null)Show information about a Collection---
getCollectionbyLanguage(collectionId, languageId, params = null)Show information about a Collection by languagefilterisoLanguage=pt
getCollectionAuthors(collectionId, params = null)Return Authors list inside a Collectioninclude=image,date,tags,authors&filterisoLanguage=pt&filtername=author_name
getCollectionDossierAuthors(collectionId, dossierId, params = null)Return Authors list inside a Dossier inside a Collectioninclude=image,date,tags,authors&filterisoLanguage=pt&filtername=author_name&sort=createdAt
getCollectionPosts(collectionId, params = null)Return Posts list inside a Collection&filterisoLanguage=pt,en&filtertags.name=tag&filtercreatedAt=2021-03-24T10:46:03&sort=id&include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filterauthor.variants.name=vicente
getCollectionDossiers(collectionId, params = null)Return Dossiers list inside a CollectionfiltercreatedAt=2021-03-24T10:46:03
getCollectionDossiersSearch(collectionId, params = null)Return Dossiers list search inside a CollectionfiltercreatedAt=2021-03-24T10:46:03&sort=id
getDossiersSearch(dossierId, params = null)Return Dossiers list searchfiltercreatedAt=2021-03-24T10:46:03&sort=id
getCollectionDossier(collectionId, dossierId, params = null)Show information about a Dossier inside a CollectionfilterisoLanguage=pt&sort=-createdAt
getCollectionDossierbyLanguage(collectionId, dossierId, params = null)Show information about a Dossier inside a Collection by LanguagefilterisoLanguage=pt
getDossierCollections(dossierId, params = null)Return Collections list inside a Dossier
getCollectionDossierPosts(collectionId, dossierId, params = null)Return Posts list inside a Dossier inside a Collectioninclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filterisoLanguage=pt
getAuthors(params = null)Return Authors listsort=-id
getAuthorsSearch(params = null)Return Authors list searchfilterisoLanguage=pt&sort=-id
getAuthor(authorId, params = null)Show information about a Authorinclude=image,date,tags,authors
getAuthorPosts(authorId, params = null)Return Posts list from a Authorinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filterisoLanguage=pt
getAuthorCollections(authorId, params = null)Return Collections list from a AuthorfilterisoLanguage=pt
getAuthorDossiers(authorId, params = null)Return Dossiers list from a AuthorfilterisoLanguage=pt
getPostsSearch(params = null)Return Posts list searchinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filterisoLanguage=pt
getDossierPosts(dossierId, params = null)Return Posts list inside a Dossierinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filterisoLanguage=pt
getCollectionDossierPostsSearch(collectionId, dossierId, params = null)Return Posts list search inside a Dossier inside a Collectioninclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filterisoLanguage=pt
getCollectionDossierPost(collectionId, dossierId, postId, params = null)Show information about a Post inside a Dossier inside a Collectioninclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents
getCollectionDossierPostbyLanguage(collectionId, dossierId, postId, params = null)Show information about a Post search inside a Dossier inside a Collectioninclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filterisoLanguage=pt
getPosts(params = null)Return Posts listinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents
getPost(postId, params = null)Show information about a Postinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documentsgetStickerGroups(params = null)Return Sticker Groups listfilterurl=&filterisoCountry=pt&per_page=3&page=1getGroupStickers(groupId, params = null)Return Stickers list from a Groupfilterdevice=all&per_page=3&page=1getPreview(params = null)Return Preview post infoinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documentsgetStickers(params = null)Return Sticker Groups listfiltersticker=all&filtersticker=homepage&filtersticker=0)getRelatedPosts(params = null)Return Posts listinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents
getRelatedPost(postId, params = null)Return Posts related to a Postinclude=stickers,bodies,tags,photos,albums,authors,labels,audios,documents
2.10.0

7 months ago

2.7.0

2 years ago

2.5.2

2 years ago

2.6.0

2 years ago

2.9.0

2 years ago

2.8.1

2 years ago

2.8.0

2 years ago

2.5.0

3 years ago

2.5.1

3 years ago

2.4.1

3 years ago

2.4.6

3 years ago

2.3.6

3 years ago

2.2.6

3 years ago

2.2.5

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago