SwiftagramCrypto Documentation

Enumeration Endpoint

public enum Endpoint  

A module-like enum defining all possible Endpoints.

Nested Types

Endpoint.Group

A module-like enum to hide away endpoint wrappers definitions.

Nested Type Aliases

Paginated

public typealias Paginated<Response, Offset, Failure: Error> = LockSessionPagerProvider<Secret, Offset, AnyPublisher<Response, Failure>>

An Endpoint allowing for a paginated request with a custom Response value.

Single

public typealias Single<Response, Failure: Error> = LockSessionProvider<Secret, AnyPublisher<Response, Failure>>

An Endpoint allowing for a single request with a custom Response value.

Properties

archived

static let archived: Endpoint.Group.Archived  

A wrapper for archive-related endpoints.

direct

static let direct: Group.Direct  

A wrapper for direct endpoints.

explore

static let explore: Group.Explore  

A wrapper for explore endpoints.

posts

static let posts: Endpoint.Group.Posts  

A wrapper for posts-specific endpoints.

recent

static let recent: Group.Recent  

A wrapper for timeline-specific endpoints.

saved

static let saved: Endpoint.Group.Saved  

A wrapper for saved-related endpoints.

Returns

A valid Endpoint.Group.Saved.

stories

static let stories: Endpoint.Group.Stories  

A wrapper for stories-specific endpoints.

users

static let users: Group.Users  

A wrapper for users endpoints.

Methods

location(_:​)

static func location(_ identifier: String) -> Endpoint.Group.Location  

A wrapper for location endpoints.

Parameters

identifier String

A valid String.

Returns

A valid Location.

location(_:​)

static func location(_ identifier: String) -> Endpoint.Single<Swiftagram.Location.Unit, Error>  

A summary for the location media.

Parameters

identifier String

A valid String.

Returns

A valid Endpoint.Single.

locations(around:​matching:​)

static func locations(around coordinates: Swiftagram.Location.Coordinates,
                          matching query: String? = nil) -> Endpoint.Single<Swiftagram.Location.Collection, Error>  

A list of locations around the given coordiantes, matching an optional query.

Parameters

coordinates Swiftagram.​Location.​Coordinates

Some valid Location.Coordinates.

query String?

An optional String. Defaults to nil.

Returns

A valid Endpoint.Single.

media(_:​)

static func media(_ identifier: String) -> Endpoint.Group.Media  

A wrapper for media endpoints.

Parameters

identifier String

A valid String.

Returns

A valid Endpoint.Media.

media(_:​)

static func media(_ media: Swiftagram.Media) -> Endpoint.Group.Media  

A wrapper for media endpoints.

Parameters

media Swiftagram.​Media

A valid Media.

Returns

A valid Endpoint.Media.

media(_:​)

static func media(_ identifier: String) -> Endpoint.Single<Swiftagram.Media.Unit, Swift.Error>  

A summary for the current media.

Parameters

identifier String

A valid String.

Returns

A valid Endpoint.Single.

media(at:​)

static func media(at url: URL) throws -> Endpoint.Group.Media  

A wrapper for media endpoints.

Parameters

url URL

A valid URL.

Throws

Some Media.Error.

Returns

A valid Media.

media(at:​)

static func media(at url: URL) -> Endpoint.Single<Swiftagram.Media.Unit, Swift.Error>  

A summary for the media at the given url.

Parameters

url URL

A valid URL.

Returns

A valid Endpoint.Single.

stories(_:​)

static func stories<C: Collection>(_ identifiers: C) -> Endpoint.Single<TrayItem.Dictionary, Error> where C.Element == String  

An endpoint for loading specific endpoints.

Parameters

identifiers C

A collection of Strings.

Returns

A valid Endpoint.Single.

tag(_:​)

static func tag(_ name: String) -> Group.Tag  

A wrapper for tag-specific endpoints.

Parameters

name String

A valid String.

Returns

A valid Tag.

tag(_:​)

static func tag(_ name: String) -> Endpoint.Single<Swiftagram.Tag, Error>  

A summary for the current tag.

Parameters

name String

A valid String.

Returns

A valid Endpoint.Single.

users(_:​)

static func users<C: Collection>(_ identifiers: C) -> Group.ManyUsers where C.Element == String  

A wrapper for users specific endpoints.

Parameters

identifiers C

A collection of Strings.

Returns

A valid Endpoint.ManyUsers.

users(_:​)

static func users<C: Collection>(_ users: C) -> Group.ManyUsers where C.Element == Swiftagram.User  

A wrapper for users specific endpoints.

Parameters

users C

A collection of Users.

Returns

A valid Endpoint.ManyUsers.

user(_:​)

static func user(_ identifier: String) -> Group.User  

A wrapper for user endpoints.

Parameters

identifier String

A valid String.

Returns

A valid EndpointUser.

user(_:​)

static func user(_ user: Swiftagram.User) -> Group.User  

A wrapper for user endpoints.

Parameters

user Swiftagram.​User

A valid User.

Returns

A valid Endpoint.User.

user(_:​)

static func user(_ identifier: String) -> Endpoint.Single<Swiftagram.User.Unit, Error>  

A summary for a given user.

Parameters

identifier String

A valid String.

Returns

A valid Endpoint.Single.

user(matching:​)

static func user(matching username: String) -> Endpoint.Single<Swiftagram.User.Unit, Error>  

A summary for a user which username exactly matches the one provided.

Parameters

username String

A valid String.

Returns

A valid Endpoint.Single.

users(matching:​)

static func users(matching query: String) -> Endpoint.Paginated < Swiftagram.User.Collection,
                                                                    RankedOffset<String?, String?>,
                                                                    Error>  

All user matching query.

Parameters

query String

A String holding reference to a valid user query.

Returns

A valid Endpoint.Pagianted.