Giter VIP home page Giter VIP logo

cloutapis's Introduction

CleanShot 2021-06-19 at 18 18 39@2x

Open-source APIs to make building on BitClout easier, faster and more fun.


What is CloutAPIs?

CloutAPIs is a set of APIs that sit on-top of the BitClout blockchain to provide simpler, richer or additional functionality and hopefully will prevent multiple developers from having to implement the same features.

In some cases, CloutAPIs will augment blockchain information with data stored off-chain for informational, metadata or optimization purposes.

๐Ÿ’ฌ Join the Discord

Why?

As early developers on BitClout we saw two trends that we hope to help avoid continuing:

  1. Many developers all having to write the same functionality to get their apps up and running
  2. Developers creating siloed "destinations" for individual features

We don't believe that the future of the platform is one node with feature X, and another with feature Y, but rather a framework of features that are collaborated on. In time, we hope to build an economic framework around this too.

Today, CloutAPIs are free for all to use. In the near future we will introduce API keys for apps and in the further future will look to explore models of monetization that can support a developer ecosystem โ€” where a new developer may choose to distribute their feature via CloutAPIs instead of building a new destination portal for it. That is when we all truly win.


APIs

ct2

A simple way to add support for CloutTags in your application.

  • Get trending CloutTags in real time
  • List posts for any CloutTag
  • Autocomplete CloutTags
  • Get metadata for CloutTags
api-docs



comingsoon

More APIs coming soon...

If you have an idea that you'd like to see made (or want to contribute), jump over to the Issues and suggest it!

Hosted APIs

All APIs are available at https://api.cloutapis.com/. Alternatively, you can clone, and host your own version of them.

You are welcome to use our hosted versions for development, although know that we intend to explore monetization for professional usage in the future (via BitClout.)

Local Setup

Make sure you have Node.js and Yarn installed.

git clone https://github.com/cloutapis/cloutapis
cd cloutapis
yarn

Database

  • A local Postgres instance running
  • A user with username cloutapis, password cloutapis (these are declared in .env)

Once you have your local postgres instance running with the user created, you can run:

yarn db:create
yarn db:migrate

Building Locally

The typescript needs to be built before running. This only takes a few seconds:

yarn build
yarn start

Your app should now be running on localhost:5000.

Running the worker locally

The worker can be started after yarn build:

node dist/apis/clouttags/fetch/worker.js

Using Docker for the development environment

make start # starts the env
make stop # stops the env

cloutapis's People

Contributors

chrismaddern avatar jgalmeida avatar rhatem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cloutapis's Issues

Get All Tags

Hi Team,

Can you add endpoint for get all tags order by name asc?

API tests

...because ya'know... that's really important and we need them! ๐Ÿ˜Š

/clouttags/:tag/posts endpoint

Return a properly structured list of Posts given a hashtag

  • sortBy: new / popular (??)
  • numToFetch: default 20?
  • startingAtPostHashHex: for pagination

Posts should match the post objects returned from get-posts-stateless for simplicity of usage?

Post Sentiment API

Automatically determine post sentiment to allow safer automatic curation.

BitBadges API

Hey, would love to post the BitBadges API in here. Let me know if that is possible. Still needs a little updating but by the end of the week, I could have it all documented.

BitBadges API

Would love to add the BitBadges API here. It's already up and running. I will neaten up the documentation soon but what steps should I take to add it here? PR? Send documentation to someone?

Post Search API

Allow app developers to free-text search historical posts and receive the PostHashHex of posts that match.

GET /search?q=:term

returns:

[ PostHashHex ]

Params

  • sortby: latest | relevance (default: relevance)
  • numToFetch: Number of results to fetch (default: 20)

Tradeoffs & considerations

  • Historical back-indexing โ€” prefer including all history and filtering using search predicates
  • Can elastic search tokenized search perform ~well enough for most use cases?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.