GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mangofever/SimpleAPICallExample: Simple API call in iOS. This example uses APIHandler.

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
SimpleAPICallExample.xcodeproj
SimpleAPICallExample.xcodeproj
 
 
SimpleAPICallExample
SimpleAPICallExample
 
 
SimpleAPICallExampleTests
SimpleAPICallExampleTests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 

Repository files navigation

SimpleAPICallExample

This is a project to discover common requirements of API request within iOS applications.

(not Swift)

APIHandler

It's simple and uses NSURLConnection. (I think AFNetworking library can be one of options.) Actullay, this is very simple prototype and needs contributions.

See descriptions below.

SimpleAPIRequest

  • has NSURLRequest class about single API.
  • has a proper parser for that API.
  • can send API request and pass the response to the parser.
  • notifies API result via block

APIHandler

  • schedules SimpleAPIRequest(start or cancel).
  • notifies SimpleAPIRequest's result via block

SampleAPIBuilder and SimpleJSONParser

  • These are pair(request and response).
  • SampleAPIBuilder describes actual API request(URL, METHOD, Timeout...).
  • SimpleJSONParser describes how to parse the response.
  • Information about which API request use which parser is definded within SampleAPIBuilder.

Sample Code

[[APIHandler defaultAPIHandler] sendAPIRequest:[SampleAPIBuilder buildAPI] completionHandler:^(BOOL isSuccess, NSDictionary *responseResult, NSError *error) {
  NSLog(@"\nParsed JSON\n%@",responseResult.description);
}];

About

Simple API call in iOS. This example uses APIHandler.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.