Package org.opensocial

Examples of org.opensocial.Request


  }

  private void showContacts(Client client) {
    List<Person> friends = null;
    try {
      Request request = PeopleService.getFriends();
      friends = client.send(request).getEntries();
    } catch (RequestException e) {
      Log.i("DisplayFriendActivity", "Couldn't fetch friends from the " +
          "container: " + e.getMessage());
    } catch (IOException e) {
View Full Code Here


   *
   * @return new Request object to fetch the current viewer's profile comments
   * @see    Comment
   */
  public static Request getComments() {
    Request request = new Request(restTemplate, null, "GET");
    request.setModelClass(Comment.class);
    request.setGroupId(SELF);
    request.setGuid(ME);

    return request;
  }
View Full Code Here

  @Test
  public void retrieveAlbums() {
    try {
      Client client = new Client(new MySpaceProvider(),
          new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));
      Request request = AlbumsService.getAlbums();
      Response response = client.send(request);

      List<Album> albums = response.getEntries();
      assertTrue(albums != null);
      assertTrue(albums.size() > 0);
View Full Code Here

  @Test
  public void retrieveAlbum() {
    try {
      Client client = new Client(new MySpaceProvider(),
          new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));
      Request request = AlbumsService.getAlbum("myspace.com.album.81886");
      Response response = client.send(request);

      Album album = response.getEntry();
      assertTrue(album != null);
      assertTrue(album.getId().equals("myspace.com.album.81886"));
View Full Code Here

      Album album = new Album();
      album.setCaption("value");
      album.setDescription("my description goes here");

      Request request = AlbumsService.createAlbum(album);
      Response response = client.send(request);

      assertTrue(response.getStatusLink() != null);
    } catch (Exception e) {
      fail("Exception occurred while processing request");
View Full Code Here

      Album album = new Album();
      album.setId("myspace.com.album.81886");
      album.setCaption("This is my updated caption");
      album.setDescription("my description goes here");

      Request request = AlbumsService.updateAlbum(album);
      Response response = client.send(request);

      assertTrue(response.getStatusLink() != null);
    } catch (Exception e) {
      fail("Exception occurred while processing request");
View Full Code Here

    Album album = new Album();
    album.setCaption("This is my updated caption");
    album.setDescription("my description goes here");

    Request request = AlbumsService.updateAlbum(album);
  }
View Full Code Here

TOP

Related Classes of org.opensocial.Request

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.