Coder Social home page Coder Social logo

qminder / swift-api Goto Github PK

View Code? Open in Web Editor NEW
3.0 5.0 3.0 5.92 MB

Qminder API for iOS, tvOS, macOS, watchOS.

Home Page: https://www.qminder.com/

License: MIT License

Ruby 2.49% Swift 96.69% Shell 0.81%
queue qminder-api waiting customers service

swift-api's People

Contributors

2ndalpha avatar fassko avatar maarf avatar renovate[bot] avatar stdevi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

swift-api's Issues

Reconnect when losing connection with 1001 error

{
  "total_events": 1,
  "page": 0,
  "events": [
    {
      "raw": "{"rawmsg":"onDisconnected = Optional(Error Domain=WebSocket Code=1001 \\"The web application is stopping\\" UserInfo={NSLocalizedDescription=The web application is stopping})","sessionid":"811823","devicename":"Apple TV","lang":"en-US","devicemodel":"Apple TV","sourcelocation":"ScreenViewController.swift:1025","level":"ERROR","appname":"qminder-tv","timestamp":"2017-04-27T07:00:34.746Z","osversion":"10.2","appversion":"20170426.173650"}",
      "logtypes": [
        "json"
      ],
      "timestamp": 1493276434746,
      "unparsed": null,
      "logmsg": "{"rawmsg":"onDisconnected = Optional(Error Domain=WebSocket Code=1001 \\"The web application is stopping\\" UserInfo={NSLocalizedDescription=The web application is stopping})","sessionid":"811823","devicename":"Apple TV","lang":"en-US","devicemodel":"Apple TV","sourcelocation":"ScreenViewController.swift:1025","level":"ERROR","appname":"qminder-tv","timestamp":"2017-04-27T07:00:34.746Z","osversion":"10.2","appversion":"20170426.173650"}",
      "id": "ea82f83b-2b1b-11e7-80b4-0a269df17f5b",
      "tags": [
        "apple-tv"
      ],
      "event": {
        "json": {
          "lang": "en-US",
          "devicename": "Apple TV",
          "devicemodel": "Apple TV",
          "level": "ERROR",
          "timestamp": "2017-04-27T07:00:34.746Z",
          "appname": "qminder-tv",
          "appversion": "20170426.173650",
          "sessionid": "811823",
          "rawmsg": "onDisconnected = Optional(Error Domain=WebSocket Code=1001 "The web application is stopping" UserInfo={NSLocalizedDescription=The web application is stopping})",
          "osversion": "10.2",
          "sourcelocation": "ScreenViewController.swift:1025"
        },
        "http": {
          "clientHost": "80.235.115.84",
          "contentType": "application/x-www-form-urlencoded"
        }
      }
    }
  ]
}

Improve podspec

Add social links
Link to Qminder API specs instead of website

Parse data with HTML characters

{subscriptionId:ZgUROHanBE70tBZRMRh4Z86BLx6Z2b,messageId:3,data:{id:24505134,status:NEW,source:MANUAL,line:62633,firstName:^*&%*((*,created:{date:2017-02-17T08:52:33Z}}}

Empty state call

Endpoint: https://api.qminder.com/v1/tv/{id}/emptystate
This API endpoint should be called only when there are no tickets to show.
When called, this endpoint will send a reply in the form of
{
"statusCode": 200,
"layout": "simple",
"message": ""
}

Possible values for "layout" are: "simple"
Possible values for message are:

  • "Fantastic, your TV is now connected"
    When the TV was created less than 5 minutes ago.
  • "Good Morning"
    When the local time in the location is before 10:00 and there have been
    no tickets so far on that day.
  • "Ahh, it's bed time.. Welcome back tomorrow"
    When the local time is after 18:00 and there haven't been
    any new tickets in the last hour
  • "Welcome, we are ready for service. Simply sign in using the iPad!"
    When the location has at least one iPad that has given a heartbeat in the past 5 minutes
  • "Welcome, we are ready for service. Simply sign in!"
    Default case when none of the others apply
    A copy of the response is stored in the overview_monitor_empty_state_history
    table for debugging purposes.

Improve reconnection

  • Reconnect unless error code is goingAway - close connection.
  • reconnect if error is nil as well

JSON parse warning

WARN | xcodebuild: /Users/travis/build/Qminder/swift-api/QminderAPI/Classes/QminderEvents.swift:236:23: warning: 'parse' is deprecated: Use instead init(parseJSON: )``

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.