https://snapchat-example-api.herokuapp.com/api/v1/
- All endpoints accept JSON payloads for parameters
- Must include "Content-Type" HTTP header with value "application/json"
- All endpoints accept
/users/authenticaterequire theX-Api-TokenHTTP header
| // | |
| // ViewController.m | |
| // Path | |
| // | |
| // Created by Julius Parishy on 7/28/18. | |
| // Copyright © 2018 JP. All rights reserved. | |
| // | |
| #import "ViewController.h" |
| const transformDAUResponse = (response) => { | |
| return response.dau; | |
| }; | |
| const transformDateForDAUURL = (date) => { | |
| return `/get/daus/?date=${data}`; | |
| } | |
| const reduceDAUs = (DAUs) => { | |
| if (DAUs.length == 0) { |
https://snapchat-example-api.herokuapp.com/api/v1/
/users/authenticate require the X-Api-Token HTTP header| // | |
| // _JSONWriting.swift | |
| // Swerver | |
| // | |
| // Created by Julius Parishy on 12/13/15. | |
| // Copyright © 2015 Julius Parishy. All rights reserved. | |
| // | |
| import Foundation |
| #!/usr/bin/env ruby | |
| # Config | |
| TEST_DIR = "Tests" | |
| DEBUG = true | |
| PRIMARY_TARGET_NAME = "Swerver" | |
| SKIP_DIRS = [ ] | |
| VERBOSE = ARGV[0] == "-v" |
| // | |
| // SessionsController.swift | |
| // Swerver | |
| // | |
| // Created by Julius Parishy on 12/17/15. | |
| // Copyright © 2015 Julius Parishy. All rights reserved. | |
| // | |
| import Foundation |
| class UserIndexView : View { | |
| convenience init() { | |
| self.init { | |
| t in | |
| BootstrapLayout.render(t, activeTab: .Home) { t in | |
| t.div(cssClass: "jumbotron") { t in | |
| t.h1("Swerver") | |
| t.h4("An MVC Framework for Web Apps & APIs in Swift") | |
| t.tag("hr") |
| // | |
| // Layout.swift | |
| // Swerver | |
| // | |
| // Created by Julius Parishy on 12/21/15. | |
| // Copyright © 2015 Julius Parishy. All rights reserved. | |
| // | |
| import Foundation |
| // | |
| // TodosController.swift | |
| // Swerver | |
| // | |
| // Created by Julius Parishy on 12/11/15. | |
| // Copyright © 2015 Julius Parishy. All rights reserved. | |
| // | |
| import Foundation |
| // | |
| // JSON.swift | |
| // Swerver | |
| // | |
| // Created by Julius Parishy on 12/12/15. | |
| // Copyright © 2015 Julius Parishy. All rights reserved. | |
| // | |
| import Foundation |