npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@youon/posts-api-wrapper

v2.10.1

Published

A js wrapper for skoiy's posts api version 2

Downloads

117

Readme

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

| Param | Description | | -------- | ----------------------------------- | | Host | Api Host endpoint | | Version | Api Version | | apiKey | Api Key Available on Accounts APP | | apiToken | Api 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)
getDossiers(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

| URI | Description | Query parameters | Notes | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | --- | ------------------------------- | ---------------------------------- | ---------------------------------------------------- | --- | ---------------------------------------- | ----------------------------------------- | --- | ------------------------------------ | ------------------------- | ---------------------------- | -------------------------------------------------------------------------- | --- | -------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------ | --------------------- | -------------------------------------------------------------------------- | | getCollections(params = null) | Return Collection list | filter[isoLanguage]=pt,en | | getCollectionsSearch(params = null) | Return Collection list search | filter[isoLanguage]=pt,en&filter[name]=xpto | | getCollection(collectionId, params = null) | Show information about a Collection | --- | | getCollectionbyLanguage(collectionId, languageId, params = null) | Show information about a Collection by language | filter[isoLanguage]=pt | | getCollectionAuthors(collectionId, params = null) | Return Authors list inside a Collection | include=image,date,tags,authors&filter[isoLanguage]=pt&filter[name]=author_name | | getCollectionDossierAuthors(collectionId, dossierId, params = null) | Return Authors list inside a Dossier inside a Collection | include=image,date,tags,authors&filter[isoLanguage]=pt&filter[name]=author_name&sort=createdAt | | getCollectionPosts(collectionId, params = null) | Return Posts list inside a Collection | &filter[isoLanguage]=pt,en&filter[tags.name]=tag&filter[createdAt][gte]=2021-03-24T10:46:03&sort=id&include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filter[author.variants.name]=vicente | | getCollectionDossiers(collectionId, params = null) | Return Dossiers list inside a Collection | filter[createdAt][lte]=2021-03-24T10:46:03 | | getCollectionDossiersSearch(collectionId, params = null) | Return Dossiers list search inside a Collection | filter[createdAt][lte]=2021-03-24T10:46:03&sort=id | | getDossiers(params = null) | Return Dossier list | filter[isoLanguage]=pt,en | | getDossiersSearch(dossierId, params = null) | Return Dossiers list search | filter[createdAt][lte]=2021-03-24T10:46:03&sort=id | | getCollectionDossier(collectionId, dossierId, params = null) | Show information about a Dossier inside a Collection | filter[isoLanguage]=pt&sort=-createdAt | | getCollectionDossierbyLanguage(collectionId, dossierId, params = null) | Show information about a Dossier inside a Collection by Language | filter[isoLanguage]=pt | | getDossierCollections(dossierId, params = null) | Return Collections list inside a Dossier | | | getCollectionDossierPosts(collectionId, dossierId, params = null) | Return Posts list inside a Dossier inside a Collection | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filter[isoLanguage]=pt | | getAuthors(params = null) | Return Authors list | sort=-id | | getAuthorsSearch(params = null) | Return Authors list search | filter[isoLanguage]=pt&sort=-id | | getAuthor(authorId, params = null) | Show information about a Author | include=image,date,tags,authors | | getAuthorPosts(authorId, params = null) | Return Posts list from a Author | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filter[isoLanguage]=pt | | getAuthorCollections(authorId, params = null) | Return Collections list from a Author | filter[isoLanguage]=pt | | getAuthorDossiers(authorId, params = null) | Return Dossiers list from a Author | filter[isoLanguage]=pt | | getPostsSearch(params = null) | Return Posts list search | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filter[isoLanguage]=pt | | getDossierPosts(dossierId, params = null) | Return Posts list inside a Dossier | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filter[isoLanguage]=pt | | getCollectionDossierPostsSearch(collectionId, dossierId, params = null) | Return Posts list search inside a Dossier inside a Collection | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filter[isoLanguage]=pt | | getCollectionDossierPost(collectionId, dossierId, postId, params = null) | Show information about a Post inside a Dossier inside a Collection | include=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 Collection | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents&filter[isoLanguage]=pt | | getPosts(params = null) | Return Posts list | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents | | getPost(postId, params = null) | Show information about a Post | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents | | | getStickerGroups(params = null) | Return Sticker Groups list | filter[url]=&filter[isoCountry]=pt&per_page=3&page=1 | | getGroupStickers(groupId, params = null) | Return Stickers list from a Group | | filter[device]=all&per_page=3&page=1 | getPreview(params = null) | Return Preview post info | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents | | getStickers(params = null) | Return Sticker Groups list | filter[sticker][device]=all&filter[sticker][group.metaUrl]=homepage&filter[sticker][group.idType]=0) | getRelatedPosts(params = null) | Return Posts list | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents | | getRelatedPost(postId, params = null) | Return Posts related to a Post | include=stickers,bodies,tags,photos,albums,authors,labels,audios,documents | |