Structures

The following structures are available globally.

  • Struct for handling network requests and decoding JSON data

    Functions

    • performAPIRequestByMethod
    • performAPIRequestByURL
    • decodeJSONData

    Declaration

    Swift

    public struct NetworkHandler
  • Character struct contains all functions to request character(s) information(s).

    See more

    Declaration

    Swift

    public struct RMCharacter
  • Struct to store character filter properties.

    Properties

    • name: The name of the character.
    • status: The species of the character.
    • species: The species of the character.
    • type: The type or subspecies of the character.
    • gender: The species of the character.
    • query: URL query for HTTP request.
    See more

    Declaration

    Swift

    public struct RMCharacterFilter
  • Character struct for decoding character json response.

    Properties

    • id: The id of the character.
    • name: The name of the character.
    • status: The status of the character (‘Alive’, ‘Dead’ or ‘unknown’).
    • species: The species of the character.
    • type: The type or subspecies of the character.
    • gender: The gender of the character (‘Female’, ‘Male’, ‘Genderless’ or ‘unknown’).
    • origin: Name and link to the character’s origin location.
    • location: Name and link to the character’s last known location endpoint.
    • image: Link to the character’s image. All images are 300x300px and most are medium shots or portraits since they are intended to be used as avatars.
    • episodes: List of episodes in which this character appeared.
    • url: Link to the character’s own URL endpoint.
    • created: Time at which the character was created in the database.
    See more

    Declaration

    Swift

    public struct RMCharacterModel : Codable, Identifiable
  • Origin struct for decoding character json origin response.

    Properties

    • name: The name of the origin.
    • url: Link to the origin’s own URL endpoint.
    See more

    Declaration

    Swift

    public struct RMCharacterOriginModel : Codable
  • Location struct for decoding character location json response.

    Properties

    • name: The name of the location.
    • url: Link to the location’s own URL endpoint.
    See more

    Declaration

    Swift

    public struct RMCharacterLocationModel : Codable
  • API Client for Rick and Morty API.

    See more

    Declaration

    Swift

    public struct RMClient
  • Episode struct contains all functions to request episode(s) information(s).

    See more

    Declaration

    Swift

    public struct RMEpisode
  • Struct to store episode filter properties.

    Properties

    • name: The name of the episode.
    • episode: The code of the episode.
    • query: URL query for HTTP request.
    See more

    Declaration

    Swift

    public struct RMEpisodeFilter
  • Episode struct for decoding episode json response.

    Properties

    • id: The id of the episode.
    • name: The name of the episode.
    • airDate: The air date of the episode.
    • episode: The code of the episode.
    • characters: List of characters who have been seen in the episode.
    • url: Link to the episode’s own endpoint.
    • created: Time at which the episode was created in the database.
    See more

    Declaration

    Swift

    public struct RMEpisodeModel : Codable, Identifiable
  • Location struct contains all functions to request location(s) information(s).

    See more

    Declaration

    Swift

    public struct RMLocation
  • Struct to store location filter properties.

    Properties

    • name: The name of the location.
    • type: The type of the location.
    • dimension: The dimension of the location.
    • query: URL query for HTTP request.
    See more

    Declaration

    Swift

    public struct RMLocationFilter
  • Episode struct for decoding episode json response.

    Properties

    • id: The id of the location.
    • name: The name of the location.
    • type: The type of the location.
    • dimension: The dimension in which the location is located.
    • residents: List of location who have been last seen in the location.
    • url: Link to location’s own endpoint.
    • created: Time at which the location was created in the database.
    See more

    Declaration

    Swift

    public struct RMLocationModel : Codable, Identifiable