Coder Social home page Coder Social logo

freerev-server-api's Introduction

#Discontinued I don't have Free anymore. Not sure this code will work.

Description

This is an unofficial HTTP REST API for the Freebox Revolution (v6) Server. Still a lot of work to do, might break at some point.

Usage

Installation

git clone git://github.com/alram/freerev-server-api.git

cd freerev-server-api

npm install

node server.js

API Description

See the usage.txt file

Examples with curl

Get Token

curl -s http://localhost:3000/token -u freebox:password | json
{
  "token": "994e1a"
}

Get Internet connection status

curl -s http://localhost:3000/internet/status -H 'x-api-token: 994e1a' | json
{
	"type": "rfc2684",
	"rate_down": 14081,
	"bytes_up": 3060590203,
	"rate_up": 3321,
	"bandwidth_up": 925584,
	"bandwidth_down": 11232000,
	"ip_address": "XX.XX.XX.XX",
	"state": "up",
	"bytes_down": 3908853655,
	"media": "adsl"
}

Activate Wake On Lan

curl -s http://localhost:3000/internet/wol -H 'x-api-token: 994e1a' -X POST -d 'enabled=true'
{}

Verify Wake On Lan status

curl -s http://localhost:3000/internet/wol -H 'x-api-token: 994e1a' | json
{
  "enabled": true
}

De-activate Wake On Lan

curl -s http://localhost:3000/internet/wol -H 'x-api-token: 994e1a' -X POST -d 'enabled=false'
{}

License

See LICENSE file

freerev-server-api's People

Contributors

alram avatar

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.