Skip to content

Simple app showing how to use both AndroidAnnotations and RoboSpice with simple general request and lambda

Notifications You must be signed in to change notification settings

fikr4n/SpiceAnnotations

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpiceAnnotations

This is a simple app showing how to use both AndroidAnnotations and RoboSpice frameworks in one project with no complicated call nor declaration.

Create AndroidAnnotations REST client like this:

@Rest(rootUrl = "https://api.github.com/", converters = {...})
public interface RestClient {

    @Get("users/{username}")
    User getUser(@Path CharSequence username);

}

Do RoboSpice request like this:

    spiceManager.executeRequest(User.class, r -> r.getUser(username),
            username, // cache key
            DurationInMillis.ALWAYS_RETURNED, // cache duration
            this); // listener
    // or simply (no cache)
    spiceManager.executeRequest(User.class, r -> r.getUser(username), listener);

About

Simple app showing how to use both AndroidAnnotations and RoboSpice with simple general request and lambda

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%