open-index/open-npm huggingface dataset:
npm package: @speedcubing/cola
Description: Speedcubing Online's server.
Author: Zack Pace
Latest version: 0.2.2

# SCO Cola
Speedcubing Online's server software, including the authentication system and API.

## API Error Codes

### General
0. No error occurred and the requested information is available.
1. An internal server error occurred and the request was denied.  If you recieve this error code, chances are, it's a bug.  Please report the error as soon as possible.

### Authentication
5. Account doesn't exist.
6. Email already in use.
7. Password isn't strong enough.
8. Username already taken.
9. Unable to reset password, the token is outdated.
10. Incorrect password.
11. Already logged in.
12. Not logged in.

### API
13. The API key or token you provided does not match our records.
14. Invalid request, the required information was not provided.  For example, if you're trying to log in and do not provide a `password` value, this error will be thrown.
15. You do not have access to the requested information.
16. Requested information does not exist, for example, if you try to look up a user that has the `uuid` `123`, this error will most likely be thrown.
npm package: @speedcubing/donut
Description: Speedcubing Online's API client toolkit.
Author: Zack Pace
Latest version: 0.0.2

# SCO Donut
Speedcubing Online's API client.

```
npm install --save @speedcubing/donut
```

## Getting Started
The first thing you must do to use Donut is create a connection.  To create a connection, you must have an API key and token OR a Speedcubing Online account.  More information about that below.

```ts
import donut = require('@speedcubing/donut');

donut.connect({ /* OPTIONS */ })
	.then((err, connection) => {
		// ...
	});
```

## Options
- `apiKey`: An API key that is used to authenticate API requests.  If an `apiKey` value is provided, you must also provide an `apiToken` value.
- `apiToken`: Your API token, only required if you have provided an apiKey.
- `email`: The email of your Speedcubing Online account.  This can be used as an alternative to providing an API key and token, but it requires a `password` value as well.
- `password`: Your SCO account's password.
- `url`: The URL of Speedcubing Online, default: `https://speedcubing-staging.herokuapp.com`

## Getting a User
### By UUID
Using the `connection.getUserByUuid` method, you can get a user by their UUID.

```ts
import donut = require('@speedcubing/donut');

donut.connect({ /* OPTIONS */ })
	.then((err, connection) => {
		connection.getUserByUuid('[uuid]', (err, user) => {
			if (err) throw err;
			// ...
		});
	});
```
npm package: @speedcubing/pie
Description: Server for SCO
Author: Zack Pace
Latest version: 0.0.34
Deprecated: Replaced with Cola.

# SCO Pie
The server for the Speedcubing Online website.

## Notable Information
The `.env` file has been removed from the project's directory for security purposes, so you must add your own with the following value(s): 
- `session_secret`: (Preferably) a random string that is used for account sessions.  As the name says, you should keep this a secret.

## API Error Codes

### General
0. No error occured and the requested information is available.
1. An internal server error occured.  If you repeatedly recieve this error code, please create an issue so we can look into the problem as soon as possible.

### Authentication
2. You are unauthenticated and the requested information requires a user to be authenticated.
3. The email provided for the account you are trying to create is already in use.
4. The account you are trying to log into doesn't exist.
5. The provided password to the account you are trying to create isn't strong enough.
6. The email you provided is invalid.
7. The username you are trying to change to is already taken.
8. The password you provided to log in with doesn't match our records.

### API
9. The account you are requesting information about doesn't exist, either the account was deleted or the username was changed.
10. The provided API key or token is invalid.
npm package: @speedcubing/skittle
Description: Server for SCO
Author: Zack Pace
Latest version: 0.0.5
Deprecated: this package has been deprecated

# SCO Skittle
The server for the Speedcubing Online website.

## Notable Information
The `.env` file has been removed from the project's directory for security purposes, so you must add your own with the following value(s): 
- `session_secret`: (Preferably) a random string that is used for account sessions.  As the name says, you should keep this a secret.
npm package: @speedcubing/snowcone
Description: A Rubik's cube scrambler API for Node.js.
Author: Zack Pace
Latest version: 0.0.1

# SCO Snowcone
A NxN Rubik's cube scrambling library for Node.js

## Scrambling
You can scramble a cube using the `snowcone.generateScramble` method:
```js
const snowcone = require('@speedcubing/snowcone');

snowcone.generateScramble(30) // Generate scramble with 30 moves
    .then((result) => {
        console.log(result.scramble);
    });
```

## Synchronous Generation
To generate scrambles synchronously, you can use the `snowcone.generateScrambleSync` function.
```js
const snowcone = require('@speedcubing/snowcone');

const result = generateScrambleSync(30); // Generate a scramble with 30 moves
console.log(result.scramble);
```

## Arguments
```ts
snowcone.generateScramble(count: number, size: number = 3, hash?: string);
```

As you can see, the second argument, `size`, is optional and defaults to a 3x3 Rubik's cube.

If, for example, you want to generate a scramble for a 4x4 Rubik's cube, you can change this argument to 4:
```ts
snowcone.generateScramble(30, 4);
```
The first argument is the move count of the scramble, and the second argument is the size of the cube.

The same arguments apply to the `generateScrambleSync` method.

### Seeding
If you want to generate a scramble with your own `seed`, you can provide a 3rd argument, which is a string (keep in mind, you must provide a `size` argument to use a custom seed):
```js
scramble.generateScramble(30, 3, 'my custom seed');
```

## Verification
You can verify if a scramble was generated by Snowcone with the `verifyScramble` and `verifyScrambleSync` methods.

```js
const scrambled = require('scrambled');

const scramble = scramble.generateScrambleSync(30);

scrambled.verifyScramble(scramble.token, scramble.scramble, scramble.size)
    .then((result) => {
        console.log(result); // true or false
    });
```