All Projects â†’ song940 â†’ ofo

song940 / ofo

Licence: MIT license
🚲 free bike for everyone 🚲

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to ofo

MADBike
This is the public repository of the MADBike app for iOS. Public bike rental service for BiciMAD.
Stars: ✭ 23 (+53.33%)
Mutual labels:  bike, bike-share
multicycles
Multicycles.org aggregates on one map, more than 200 share vehicles like bikes, scooters, mopeds and cars. Demo APP for the Data Flow API, see https://flow.fluctuo.com
Stars: ✭ 84 (+460%)
Mutual labels:  bike
mktocak
mkTocak - an interactive map with all bike paths, parking, services, and shops!
Stars: ✭ 13 (-13.33%)
Mutual labels:  bike
SmartSpin2k
Transform your spin bike into a Smart Trainer!
Stars: ✭ 88 (+486.67%)
Mutual labels:  bike
rcn.io
🚴 Making bike racing in USA "a better place" or "great again"
Stars: ✭ 43 (+186.67%)
Mutual labels:  bike
velolibre
Construire un vélo open source
Stars: ✭ 22 (+46.67%)
Mutual labels:  bike
nycbikemap
A web-based, unified, interactive bike map for NYC that combines information from NYC OpenData, Citi Bike and other sources.
Stars: ✭ 15 (+0%)
Mutual labels:  bike

ofo ofo

free bike for everyone

Installation

$ npm i ofo

Example

const ofo = require('ofo');

(async () => {
  
  const location = { lat: 48.85, lng: 2.37 };

  let token = await waitForInput('Do you have user token ? ');
  if(!token){
    const ccc    = await waitForInput('What\'s your country code ? ');
    const mobile = await waitForInput('What\'s your mobile phone number ? ');
    const result = await ofo.code(mobile, { ccc });
    console.log('sms code sent:', result);
    
    const code = await waitForInput('please input OTP code:> ');
    ({ token } = await ofo.login(mobile, code, location));
    console.log('user token:', token);
  }

  const bikes = await ofo.near(token, location);
  console.log('near bikes', bikes);

})();

output:

~$ node example
Do you have user token ?
What's your country code ? 86
What's your mobile phone number ? 18510100102
sms code sent: {}
please input OTP code:> 1866
user token: efdef560-9fba-11e8-8cc1-ed96632744a7
near bikes { cars:
   [ { carno: 'gEgdNq',
       bomNum: '3DA',
       userIdLast: '1',
       lng: 2.3686030741643,
       lat: 48.850329008564 },
     { carno: 'm9qdDA',
       bomNum: '5CA',
       userIdLast: '1',
       lng: 2.371883877277,
       lat: 48.846629926471 } ],
  expPrice:
   { price: '0.50',
     actualPrice: '0.50',
     orderTime: 1200,
     currency: '€',
     type: 1 },
  icon:
   'http://ofo-testmeixi-image.oss-us-west-1.aliyuncs.com//report/6fc78646df3a375416f9c1884728fa50.png',
  bikeIcon:
   [ { bomNum: '0',
       icon:
        'http://ofo-testmeixi-image.oss-us-west-1.aliyuncs.com//report/6fc78646df3a375416f9c1884728fa50.png',
       animationUrl: '' } ] }

for more example see examples .

APIs

  • code
  • login
  • near
  • Server
  • createServer

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3

MIT

This work is licensed under the MIT license.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].