Git Product home page Git Product logo

orange-m2m's Introduction

This sample demonstrates how to consume the Orange M2M API from a Node.js application.

How to use it

  1. Clone this project
  2. Create an instance of the Orange service
    bx service create <service-name> <service-plan> <myservice-name>
    
  3. Bind this service to this application by editing the manifest.yml
    ---
    applications:
    - disk_quota: 1024M
      name: orange-simpleapitest
      path: .
      buildpack: sdk-for-nodejs
      instances: 1
      memory: 256M
      services:
      - ENTER THE NAME OF YOUR SERVICE HERE
  4. Push this project to Bluemix
    bx cf push
    
  5. Go to Bluemix

Resources

This sample contains additional API resources to retrieve SIM details in JSON format.

    http://<hostname>/m2m/devices
  {
    "sim": {
      "serialNumber": "2320300294956",
      "status": "ACTIVATED"
    }
    },
    {
      "sim": {
        "serialNumber": "2310300475382",
        "status": "ACTIVATED"
      }
    }
    http://<hostname>/m2m/devices/<device-id>
  {
    "customerEnvironmentIdentifier": "50000022",
      "sim": {
        "serialNumber": "2320300294956",
        "puk1": "42168269",
        "puk2": "26935883",
        "imei": "3544230215453101",
        "status": "ACTIVATED",
        "lastStatusRefreshDate": "2017-04-01T04:00:16+02:00",
        "lastStatusChangeDate": "2015-01-31T12:09:57+01:00"
      },
      "subscription": {
        "identifier": "34000324",
        "description": {
          "value": "M2M automotive",
          "service": [
          "APN orange.fr 3G",
          "roaming control option",
          "12 month test mode flag",
          "voice calls white list",
          "SMA TEST NOCATCT1            ",
          "multimedia content filtering ",
          "SMA PROD NOCATCP1            ",
          "SMA PROD NOCATCP2            ",
          "APN orange.acte 3G",
          "SMA TEST NOCATCT2            ",
          "APN orange 3G",
          "orange.m2m.spec APN          "
          ]
      },
      "creationDate": "2013-05-07T00:00:00+02:00",
      "connectionDate": "2013-05-07T00:00:00+02:00",
      "msisdnVoice": {
        "cc": "33",
        "sn": "632498745"
      }
      },
      "customerIdentifier": {
        "type": "SIREN",
        "identifier": "428706097"
    }
  }

Test your API outside Bluemix

This project comes with a Postmam json file ready to test Orange API. Make sure to update your username and password first.

Test the UI without any access to Orange M2M API

This project contains a sample of SIM that would be return by the API. This sample is available in the file devices.json. To test it, open the file devices.service.js, uncomment this line

$http.get("/api/devices.json").success(function (data) {

and comment this line:

//$http.get("/m2m/devices").success(function (data) {

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.