Android Open Source - kluster-android Kluster Service






From Project

Back to project page kluster-android.

License

The source code is released under:

Apache License

If you think the Android project kluster-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cs446.kluster.net;
//  w  ww  .  j a  va 2 s  .  c  o  m
import java.util.List;

import retrofit.Callback;
import retrofit.client.Response;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.Header;
import retrofit.http.Headers;
import retrofit.http.Multipart;
import retrofit.http.POST;
import retrofit.http.Part;
import retrofit.http.Path;
import retrofit.http.Query;
import retrofit.mime.TypedFile;
import retrofit.mime.TypedString;

import com.cs446.kluster.models.AuthUser;
import com.cs446.kluster.models.Event;
import com.cs446.kluster.models.Photo;
import com.cs446.kluster.models.User;
import com.google.gson.JsonObject;

public interface KlusterService {
  
  @GET("/auth")
  void getAuth(@Header("Authorization") String credentials, Callback<AuthUser> cb);
  
  @POST("/users")
  void createUser(@Body User user, Callback<User> cb);
  
  @GET("/users/{userid}")
  void getUser(@Path("userid") String userid, Callback<AuthUser> cb);
  
  @GET("/photos/{photo}")
  void getPhoto(@Path("photo") String photoid, Callback<Photo> cb);
  
  @GET("/photos")
  void getPhotos(@Query("eventIds") String eventids, Callback<List<Photo>> cb);
  
  @GET("/photos")
  void getPhotosByIds(@Query("ids") String ids, Callback<List<Photo>> cb);
  
  @GET("/photos")
  void getPhotosByUserIds(@Query("userIds") String userids, Callback<List<Photo>> cb);
  
  @Multipart
  @POST("/photos")
  void createPhoto(@Part("image") TypedFile photo, @Part("loc") TypedString location, @Part("time") TypedString time, @Part("tags[0]") TypedString tag1, @Part("tags[1]") TypedString tag2, @Part("tags[2]") TypedString tag3, Callback<Photo> cb);
  
  @GET("/events/{event}")
  void getEvent(@Path("event") String eventid, Callback<Event> cb);

  @GET("/events")
  void getEvents(Callback<List<Event>> cb);
  
  @GET("/events")
  void getEvents(@Query("ll") String ll, @Query("radius_meters") String radius, Callback<List<Event>> cb);
  
  @GET("/events")
  void getEvents(@Query("ids") String eventids, @Query("limit") String limit, @Query("bounds") String bounds, Callback<List<Event>> cb);

  @Headers("Content-type: application/json")
  @POST("/photos/{photo}/rate")
  void ratePhotoUp(@Path("photo") String photoid, @Body JsonObject upValue, Callback<Response> cb);

  @Headers("Content-type: application/json")
  @POST("/photos/{photo}/rate")
  void ratePhotoDown(@Path("photo") String photoid, @Body JsonObject downValue, Callback<Response> cb);
}




Java Source Code List

android.app.GridFragment.java
android.app.NonSwipeableViewPager.java
android.app.ScaleImageView.java
com.cs446.kluster.ConfigManager.java
com.cs446.kluster.KlusterApplication.java
com.cs446.kluster.cache.CacheUtils.java
com.cs446.kluster.cache.DiskLruCache.java
com.cs446.kluster.cache.DiskLruImageCache.java
com.cs446.kluster.cache.KlusterCache.java
com.cs446.kluster.data.AbstractContentStorageAdapter.java
com.cs446.kluster.data.EventProvider.java
com.cs446.kluster.data.EventStorageAdapter.java
com.cs446.kluster.data.PhotoProvider.java
com.cs446.kluster.data.PhotoStorageAdapter.java
com.cs446.kluster.data.SearchProvider.java
com.cs446.kluster.data.SearchStorageAdapter.java
com.cs446.kluster.data.StorageAdapter.java
com.cs446.kluster.data.StorageConstants.java
com.cs446.kluster.data.serialize.AuthUserAdapter.java
com.cs446.kluster.data.serialize.EventAdapter.java
com.cs446.kluster.data.serialize.PhotoAdapter.java
com.cs446.kluster.data.serialize.SerializerUtils.java
com.cs446.kluster.data.serialize.UserAdapter.java
com.cs446.kluster.map.MapUtils.java
com.cs446.kluster.models.AuthUser.java
com.cs446.kluster.models.Event.java
com.cs446.kluster.models.Photo.java
com.cs446.kluster.models.User.java
com.cs446.kluster.net.AuthInterceptor.java
com.cs446.kluster.net.AuthKlusterRestAdapter.java
com.cs446.kluster.net.EventsCallback.java
com.cs446.kluster.net.KlusterRestAdapter.java
com.cs446.kluster.net.KlusterService.java
com.cs446.kluster.net.NetworkUtils.java
com.cs446.kluster.net.PhotosCallback.java
com.cs446.kluster.net.UploadService.java
com.cs446.kluster.views.activities.LoginActivity.java
com.cs446.kluster.views.activities.MainActivity.java
com.cs446.kluster.views.activities.PhotoFactory.java
com.cs446.kluster.views.activities.PhotoGridActivity.java
com.cs446.kluster.views.fragments.DiscoverFragment.java
com.cs446.kluster.views.fragments.EventDialogFragment.java
com.cs446.kluster.views.fragments.EventGridAdapter.java
com.cs446.kluster.views.fragments.EventGridFragment.java
com.cs446.kluster.views.fragments.EventMapFragment.java
com.cs446.kluster.views.fragments.FilterDialogFragment.java
com.cs446.kluster.views.fragments.PhotoGridAdapter.java
com.cs446.kluster.views.fragments.PhotoGridFragment.java
com.cs446.kluster.views.fragments.PhotoViewerFragment.java
com.cs446.kluster.views.fragments.SearchFragment.java
com.cs446.kluster.views.fragments.SearchGridFragment.java
com.cs446.kluster.views.fragments.SearchMapFragment.java
com.cs446.kluster.views.fragments.SignupFragment.java
com.cs446.kluster.views.fragments.UserProfileFragment.java
com.cs446.kluster.views.map.PhotoInfoWindowAdapter.java