No description or website provided.
Swift Shell Ruby Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Connpass
ConnpassSample
Images
.gitignore
.travis.yml
Connpass.podspec
LICENSE
README.md

README.md

Connpass

CI Status Version License Platform

connpass search API for Swift.

Usage

let query = ConnpassSearchQuery(.Keyword("swift"), .Count(100))
ConnpassApiClient.sharedClient.searchEvent(query) { response in
    switch response.result {
        case .Success(let result):
            print(result.events)
        case .Failure(let error):
            print(error)
    }
}

Parameters

You can use Associated values as parameter with ConnpassSearchQuery.

ConnpassSearchQuery.Parameter Type
.EventId Int
.Keyword String
.KeywordOr String
.Ym Int
.Ymd Int
.Nickname String
.OwnerNickname String
.SeriesId Int
.Start Int
.Order DisplayOrder
.Count Int
DisplayOrder
.UpdateTime
.StartDate
.New

Result

You can fetch the result as ConnpassResult.

public struct ConnpassResult {
    public let resultsReturned: Int
    public let resultsAvailable: Int
    public let resultsStart: Int
    public let events: [ConnpassEvent]
}
public struct ConnpassEvent {
    public enum EventType: String {
        case Participation = "participation"
        case Advertisement = "advertisement"
    }

    public let eventId: Int
    public let title: String
    public let `catch`: String
    public let `descriotion`: String
    public let eventUrl: NSURL
    public let hashTag: String
    public let startedAt: NSDate
    public let endAt: NSDate
    public let limit: Int?
    public let eventType: EventType
    public let series: ConnpassSeries?
    public let address: String?
    public let place: String?
    public let lat: Double?
    public let lon: Double?
    public let ownerId: Int
    public let ownerNickname: String
    public let ownerDisplayname: String
    public let accepted: Int
    public let waiting: Int
    public let updatedAt: NSDate
}
public struct ConnpassSeries {
    public let url: String
    public let id: Int
    public let title: String
}

Functions

public func searchEvent(query: ConnpassSearchQuery, completion: (Response -> Void)?)
public func searchEvent(query: ConnpassSearchQuery, success: ((NSURLResponse?, ConnpassResult) -> Void)?, failure: ((NSURLResponse?, NSError) -> Void)?)

Https usage

This client uses http. If you want to use https, change this property.

ConnpassApiClient.sharedClient.useHttps = true

Installation

Connpass is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Connpass"

API Reference

http://connpass.com/about/api/

Requirements

  • Xcode 7.3 or greater
  • iOS 8.0 or greater

Author

szk-atmosphere, s1180183@gmail.com

License

Connpass is available under the MIT license. See the LICENSE file for more info.