Skip to content

zixia/ucapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

17SALSA UCHome App Circle CI

Stories in Ready Circle CI GitHub Issues Gitter

Browser Support

See: https://appadvice.com/app/17salsa/1019231034

Coding style

  • JSCS: preset to google
  • JSHint
  • vim:
  • pathogen
  • syntastic vim-js-indent vim-sensible html5.vim
  • color-theme distinguished

Reference: https://github.com/showdownjs/code-style

Semantic Versioning

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards-compatible manner, and
  • PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

Reference: http://semver.org/

Init Project After Check Out

  1. npm install -g ionic cordova gulp ios-deploy ios-sim
  2. cd app
  3. npm install
  4. bower install
  5. ionic resources
  6. ionic browser add crosswalk
  7. ionic config build
  8. ionic platform add ios android
  9. ionic hooks add
  10. ionic add ionic-service-push
  11. ionic build ios android
  12. ionic serve --lab

Debug

ionic run android --livereload --consolelogs --serverlogs

REST API

curl -u token https://17salsa.com/api/v2/feed

### API related HTTP header
 * ERROR CODE
 * X-UCAPP-CLIENT-VERSION
 * X-UCAPP-SERVER-VERSION
 * X-UCAPP-MESSAGE

common params:
 * before/:date
 * after/:date
 * limit/:limit
  
/api/v2/auth
  POST
    /login
      {username: $username, password: $password}
  /logout
  
/api/v2/user
  GET
    /me - current user
    /:id - {name, nick, sex, avatar, location, ...}
    /:id/detail - {... ...}

/api/v2/event
  GET
    / - lastest event id list
    /:id - {...}
    /:id/detail - {... ...}

    /api/v2/message
    GET
    / {uid, date}
    /:uid - { {date,msg}, {}, ... }

    POST
    /:uid - {msg}

    /api/v2/feed
    / - [ {...} ]
    /api/v2/reply
    /api/v2/like
    /api/v2/contact

    /api/v2/batch
      POST
      [
        {
          "method": "POST",
          "path": "/1.1/classes/Post",
          "body": {
            xx: 'xx',
            xx: 'xx'
          }
        },
        {
          "method": "POST",
          "path": "/1.1/classes/Post",
          "body": {
            "content": "",
            "user": ""
          }
        }
      ]