Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/branchard/fast-speedtest-api
fast.com API / CLI tool
https://github.com/branchard/fast-speedtest-api
api cli fast speedtest speedtest-cli
Last synced: 5 days ago
JSON representation
fast.com API / CLI tool
- Host: GitHub
- URL: https://github.com/branchard/fast-speedtest-api
- Owner: branchard
- License: gpl-3.0
- Created: 2018-02-08T08:40:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:12:47.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T19:12:24.851Z (7 months ago)
- Topics: api, cli, fast, speedtest, speedtest-cli
- Language: JavaScript
- Homepage: https://npmjs.com/fast-speedtest-api
- Size: 263 KB
- Stars: 160
- Watchers: 12
- Forks: 37
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fast.com API / CLI tool
[![Build Status](https://travis-ci.org/branchard/fast-speedtest-api.svg?branch=master)](https://travis-ci.org/branchard/fast-speedtest-api)
[![NPM version](https://img.shields.io/npm/v/fast-speedtest-api.svg?colorB=0a7bbb)](https://www.npmjs.com/package/fast-speedtest-api)
[![Node version](https://img.shields.io/node/v/fast-speedtest-api.svg)](https://nodejs.org)
[![GitHub license](https://img.shields.io/github/license/branchard/fast-speedtest-api.svg?colorB=0a7bbb)](https://github.com/branchard/fast-speedtest-api/blob/master/LICENSE)A speed test powered by fast.com
From scratch, with no dependencies## Installation
```bash
$ npm install --save fast-speedtest-api
```## Command-Line Tool
```bash
$ npm install --global fast-speedtest-api
$ fast-speedtest --help
fast-speedtest - speed test powered by fast.com
usage: fast-speedtest token [-v, --verbose] [-r, --raw] [-n, --no-https] [-t, --timeout timeout] [-c, --count url-count] [-b, --buffer buffer-size] [-u, --unit output-unit]
```## Api usage
Example:
```js
const FastSpeedtest = require("fast-speedtest-api");let speedtest = new FastSpeedtest({
token: "your-app-token", // required
verbose: false, // default: false
timeout: 10000, // default: 5000
https: true, // default: true
urlCount: 5, // default: 5
bufferSize: 8, // default: 8
unit: FastSpeedtest.UNITS.Mbps, // default: Bps
proxy: 'http://optional:auth@my-proxy:123' // default: undefined
});speedtest.getSpeed().then(s => {
console.log(`Speed: ${s} Mbps`);
}).catch(e => {
console.error(e.message);
});
```## FAQ
### How to get app token ?
Go on [fast.com](https://fast.com/), open your browser devtools, go on `Network` tab and copy the token on the request url that looks like `https://api.fast.com/netflix/speedtest?https=true&token=&urlCount=5`## TODO
- Better verbose mode
- Add tests## Feel free to contribute