Hi George L Michelon Gregorio.
Vitor Venturin

hi Victor, thanks for reply…I have two questions .

1-How i make an HttpHeader Request in Moya…I m used your project to improve my skills in MVVM and reactive programing, but i cant find a way to pass my key from traktv in a header.

Sample here?

enum GooglePlaces : TargetType {

case getPlaces(location: String, type: Type, radius: Int, key: String)

case getPhoto(photo: Photo, key: String)

case getNextPage(nextPageToken: String, key: String)

var baseURL: URL { return URL(string: “https://maps.googleapis.com/maps/api/place")! }

2-I need just call my fetch method without passing through a pickerview selection(ye is a newbie question i know-).but i realized that you create a enum with all categories from google api and create a index to get the especfic category.But in my case i need just call a method, just call the model with result.I tried here but my code crashed.


let selectedType = Type(rawValue: response.0)!print(“selected item”,selectedType)

self.tableHeaderLabel.text = NSLocalizedString(selectedType.description, comment: “”)self.fetchPlacesBy(type: selectedType)self.fetchPlacesBy(type: selectedType)

In placeViewModel the result is linked with type variable that is linked to the enum

.mapObject(type: Result.self)

Can you help me? I m using your code to understanding how moya works in this context…Thanks a lot…

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.