An open API service indexing awesome lists of open source software.

https://github.com/selfmadesystem/you.js

You.com API Library
https://github.com/selfmadesystem/you.js

Last synced: 5 days ago
JSON representation

You.com API Library

Awesome Lists containing this project

README

          




You.JS Logo




You.JS


An unofficial JavaScript library for You.com.


About

Install
How To Use

License

## About
Welcome to the the You.JS Library!

This library allows developers to easily access and utilize all of the functionality of the You.com platform through a simple and intuitive JavaScript API. With the library, developers can access a variety of You.com apps and services, including but not limited to:

* The search engine

To get started with You.JS, read install and then how to use.

We hope you enjoy using You.JS!
> adapted from [YouDotCom](https://github.com/YouAPI/YouDotCom)'s README.md

## Install

To install the You.JS library, simply run the following command in your terminal:

```bash
npm install youdotjs # for npm
yarn add youdotjs # for yarn
pnpm add youdotjs # for pnpm
bun install youdotjs # for bun
```

> Note: You.JS is named `youdotjs` on npm because `youjs` is already taken and `you.js` is too similar.

> Note: It should work in the browser, but it's not tested.

## How To Use

### Search

To search You.com, you can use the `search` function. It takes in a query and returns a `Promise` that resolves to a `SearchResult` object.

```javascript
const you = require('youdotjs');

const API_TOKEN = 'Put your API token here';

you.search('Hello world!', API_TOKEN).then((result) => {
console.log(result);
});
```

### YouChat

Currently not implemented.

## Discord

You.com has an official Discord server! Join it [here](https://you.club). Don't expect to get any support for this library there, though.

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details