SwiftagramCrypto Documentation

Extensions on Endpoint.Group.Media

Properties

summary

var summary: Endpoint.Single<Swiftagram.Media.Unit, Swift.Error>  

A summary for the current media.

comments

var comments: Endpoint.Paginated < Swiftagram.Comment.Collection,
                                     RankedOffset<String?, String?>,
                                     Swift.Error>  

A list of comments for the current media.

likers

var likers: Endpoint.Paginated < Swiftagram.User.Collection,
                                   RankedOffset<String?, String?>,
                                   Swift.Error>  

A list of likers for the current media.

viewers

var viewers: Endpoint.Paginated < Swiftagram.User.Collection,
                                    RankedOffset<String?, String?>,
                                    Swift.Error>  

Fetch all viewers for the current story.

Methods

archive()

func archive() -> Endpoint.Single<Status, Swift.Error>  

Archive the current post.

Returns

A valid Endpoint.Single.

comment(with:​under:​)

func comment(with text: String,
                 under parentCommentIdentifier: String? = nil)
    -> Endpoint.Single<Swiftagram.Comment.Unit, Swift.Error>  

Post a comment under the current post, and optionally under a given comment.

Parameters

text String

A valid String.

parent​Comment​Identifier String?

An optional String. Defaults to nil.

Returns

A valid Endpoint.Single.

delete()

func delete() -> Endpoint.Single<Status, Swift.Error>  

Delete the current media.

Returns

A valid Endpoint.Single.

like()

func like() -> Endpoint.Single<Status, Swift.Error>  

Like the current post.

Returns

A valid Endpoint.Single.

save(in:​)

func save(in collectionIdentifier: String) -> Endpoint.Single<Status, Swift.Error>  

Save in a specific collection.

Parameters

collection​Identifier String

A valid String.

Returns

A valid Endpoint.Single.

unarchive()

func unarchive() -> Endpoint.Single<Status, Swift.Error>  

Unarchive the current post.

Returns

A valid Endpoint.Single.

unlike()

func unlike() -> Endpoint.Single<Status, Swift.Error>  

Unlike the current post.

Returns

A valid Endpoint.Single.

comments(_:​)

func comments<C: Collection>(_ identifiers: C) -> ManyComments where C.Element == String  

A wrapper for comments-specific endpoints.

Parameters

identifiers C

A collection of Strings.

Returns

A valid Endpoint.ManyComments.

save()

func save() -> Endpoint.Single<Status, Swift.Error>  

Save the current media.

Returns

A valid Endpoint.Single.

unsave()

func unsave() -> Endpoint.Single<Status, Swift.Error>  

Unsave the current media.

Returns

A valid Endpoint.Single.

comment(_:​)

func comment(_ identifier: String) -> Comment  

A wrapper for comments endpoints.

Parameters

identifier String

A valid String.

Returns

A valid Endpoint.Comment.