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

@newsteam/cosmos

v1.0.5

Published

This library provides a convenient way for developers to interact with the CosMoS CMS API

Downloads

61

Readme

CosMoS Client Library

npm package

Welcome to the CosMoS Client Library! This library provides a convenient way for developers to interact with the CosMoS CMS API, empowering them to seamlessly integrate CosMoS functionalities into their applications.

About CosMoS CMS

CosMoS is a robust news publishing CMS developed by News Team. With CosMoS, publishers can efficiently manage their digital news content, from article creation and management to user authentication and subscription handling. The CMS offers a comprehensive set of API endpoints, allowing developers to perform various tasks such as retrieving articles, searching for content, managing authors, and more.

For detailed documentation on the features and capabilities of the CosMoS CMS API, please refer to the CosMoS Documentation Site.

About This Client Library

The CosMoS Client Library simplifies the process of interacting with the CosMoS API by providing a set of intuitive functions and utilities. By integrating this library into your project, you can leverage the full potential of the CosMoS CMS without the need to manage complex API requests manually.

Getting Started

To get started with the CosMoS Client Library, simply install it via NPM and follow the usage instructions provided in this documentation. Whether you're building a news website, corporate communications portal, content aggregator, or ANY other application that requires seamless access to digital news/media content, the CosMoS Client Library is here to streamline your development process.

npm install @newsteam/cosmos

Usage

To start using the CosMoS Client Library in your project, follow these simple steps:

  1. Initializing the API: Create an instance of the NewsTeamCosmosAPI class with the necessary configuration options. Here's an example:
import { NewsTeamCosmosAPI } from "@newsteam/cosmos";

const api = new NewsTeamCosmosAPI({
    consumer: "your_consumer_key",
    host: "https://your.cosmos_instance.com",
});
  1. Making API Calls: Use the instantiated API object to make calls to the CosMoS API endpoints. Here's an example of fetching articles:
const { data: articles, error: getArticlesError } = await api.articles.getAll({
    limit: 20
});

if(getArticlesError){
    // there was an error with this request
} else {
    // articles has been returned sucessfully
    console.log(articles.length);
}

That's it! You're now ready to integrate the CosMoS Client Library into your project and start leveraging the power of the CosMoS CMS API.

Documentation

For more details on available modules, methods, and configuration options, please refer to the See CosMoS Documentation Site.