retrofit.http.Streaming Java Examples

The following examples show how to use retrofit.http.Streaming. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StreetApi.java    From StreetView with Apache License 2.0 4 votes vote down vote up
@GET("/maps/api/streetview?")
@Streaming
Call<ResponseBody> getStreetView(@Query("size") String size, @Query("location") String location,
                                 @Query("heading") String heading, @Query("pitch") String pitch,
                                 @Query("fov") String fov, @Query("key") String key);
 
Example #2
Source File: StreetApi.java    From StreetView with Apache License 2.0 4 votes vote down vote up
@GET("/maps/api/streetview?")
@Streaming
Call<ResponseBody> getStreetView(@Query("size") String size, @Query("location") String location,
                                 @Query("heading") String heading, @Query("pitch") String pitch,
                                 @Query("fov") String fov, @Query("key") String key);
 
Example #3
Source File: VideoServiceProxy.java    From mobilecloud-15 with Apache License 2.0 2 votes vote down vote up
/**
 * This method uses Retrofit's @Streaming annotation to indicate
 * that the method is going to access a large stream of data
 * (e.g., the mpeg video data on the server).  The client can
 * access this stream of data by obtaining an InputStream from the
 * Response as shown below:
 * 
 * VideoServiceProxy client = ... // use retrofit to create the client
 * Response response = client.getData(someVideoId); 
 * InputStream videoDataStream = response.getBody().in();
 * 
 * @param id
 * @return Response which contains the actual Video data.
 */
@Streaming
@GET(VIDEO_DATA_PATH)
Response getData(@Path(ID_PARAMETER) long id);
 
Example #4
Source File: VideoSvcApi.java    From mobilecloud-15 with Apache License 2.0 2 votes vote down vote up
/**
 * This method uses Retrofit's @Streaming annotation to indicate that the
 * method is going to access a large stream of data (e.g., the mpeg video 
 * data on the server). The client can access this stream of data by obtaining
 * an InputStream from the Response as shown below:
 * 
 * VideoSvcApi client = ... // use retrofit to create the client
 * Response response = client.getData(someVideoId);
 * InputStream videoDataStream = response.getBody().in();
 * 
 * @param id
 * @return
 */
@Streaming
   @GET(VIDEO_DATA_PATH)
   Response getVideoData(@Path(ID_PARAMETER) long id);
 
Example #5
Source File: VideoSvcApi.java    From mobilecloud-15 with Apache License 2.0 2 votes vote down vote up
/**
 * This endpoint should return the video data that has been associated with
 * a Video object or a 404 if no video data has been set yet. The URL scheme
 * is the same as in the method above and assumes that the client knows the ID
 * of the Video object that it would like to retrieve video data for.
 * 
 * This method uses Retrofit's @Streaming annotation to indicate that the
 * method is going to access a large stream of data (e.g., the mpeg video 
 * data on the server). The client can access this stream of data by obtaining
 * an InputStream from the Response as shown below:
 * 
 * VideoSvcApi client = ... // use retrofit to create the client
 * Response response = client.getData(someVideoId);
 * InputStream videoDataStream = response.getBody().in();
 * 
 * @param id
 * @return
 */
@Streaming
   @GET(VIDEO_DATA_PATH)
   Response getData(@Path(ID_PARAMETER) long id);
 
Example #6
Source File: TapchatAPI.java    From tapchat-android with Apache License 2.0 votes vote down vote up
@GET("/{path}") @Streaming Response oobInclude(@EncodedPath("path") String path);