Skip to content

Instantly share code, notes, and snippets.

@mohsenoid
Last active February 4, 2018 17:36
Show Gist options
  • Save mohsenoid/0a28c32dce65b916ef5da8df178ea37e to your computer and use it in GitHub Desktop.
Save mohsenoid/0a28c32dce65b916ef5da8df178ea37e to your computer and use it in GitHub Desktop.
package com.mirhoseini.marvel.domain.client;
import com.mirhoseini.marvel.domain.model.CharactersResponse;
import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;
public interface MarvelApi {
String NAME = "name";
String API_KEY = "apikey";
String HASH = "hash";
String TIMESTAMP = "ts";
// http://gateway.marvel.com:80/v1/public/characters?name=Iron%20Man&apikey=PUBLIC_API_KEY&hash=HASH&ts=TIMESTAMP
@GET("v1/public/characters")
Observable<CharactersResponse> getCharacters(
@Query(NAME) String query,
@Query(API_KEY) String publicKey,
@Query(HASH) String hash,
@Query(TIMESTAMP) long timestamp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment