Sign inSign up

skyrabot/saelem

By skyrabot

โ€ขUpdated about 4 years ago

GraphQL Horoscope API for Skyra

Image
0

3.8K

skyrabot/saelem repository overview

logo

โ Saelem

Horoscope API for Skyraโ 

GitHub npm

Support Server


โ Description

Horoscope query GraphQL API for Skyraโ 

Key Features

โ Installation

Install client side typings from yarnโ  or npmโ :

yarn add -D @skyra/saelem
npm install -D @skyra/saelem

โ Usage

import { Query } from '@skyra/saelem';

interface SaelemResponse<K extends keyof Omit<Query, '__typename'>> {
	data: Record<K, Omit<Query[K], '__typename'>>;
}

fetch('http://localhost:8284', {
	method: 'POST',
	headers: {
		'Content-Type': 'application/json'
	},
	body: JSON.stringify({
		query: `
      {
          getHoroscope(sunsign: aries) {
              prediction
              intensity
              keywords
              mood
              rating
              date
          }
      }
    `
	})
})
	.then((res) => res.json() as SaelemResponse<'getHoroscope'>)
	.then((json) => console.log(json.data));

โ Buy us some doughnuts

Skyra Project is open source and always will be, even if we don't get donations. That said, we know there are amazing people who may still want to donate just to show their appreciation. Thanks you very much in advance!

We accept donations through Patreon, BitCoin, Ethereum, and Litecoin. You can use the buttons below to donate through your method of choice.

โ Contributors โœจ

Thanks goes to these wonderful people (emoji keyโ ):

This project follows the all-contributorsโ  specification. Contributions of any kind welcome!

Tag summary

Content type

Image

Digest

sha256:f9854e19bโ€ฆ

Size

227.9 MB

Last updated

about 4 years ago

docker pull skyrabot/saelem