Package org.opensocial.providers

Examples of org.opensocial.providers.MySpaceProvider


  }

  @Test
  public void retrieveMediaItem() {
    try {
      Client client = new Client(new MySpaceProvider(),
          new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));
      Request request = MediaItemsService.getMediaItem(
          "myspace.com.mediaItem.image.646364", "myspace.com.album.81886");
      Response response = client.send(request);
View Full Code Here


  }

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

      List<Model> categories = response.getEntries();
View Full Code Here

  }

  @Test
  public void createMediaItem() {
    try {
      Client client = new Client(new MySpaceProvider(),
          new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));

      MediaItem mediaItem = new MediaItem();
      mediaItem.setUrl("http://www.google.com/intl/en_ALL/images/logo.gif");
      mediaItem.setAlbumId("myspace.com.album.81886");
View Full Code Here

  }

  @Test(expected=RequestException.class)
  public void createMediaItemWithoutAlbumId() throws RequestException,
      IOException {
    Client client = new Client(new MySpaceProvider(),
        new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));

    MediaItem mediaItem = new MediaItem();
    mediaItem.setUrl("http://www.google.com/intl/en_ALL/images/logo.gif");
    mediaItem.setType("IMAGE");
View Full Code Here

  }

  @Test
  public void updateMediaItem() {
    try {
      Client client = new Client(new MySpaceProvider(),
          new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));

      MediaItem mediaItem = new MediaItem();
      mediaItem.setId("myspace.com.mediaItem.image.646364");
      mediaItem.setAlbumId("myspace.com.album.81886");
View Full Code Here

    }
  }

  @Test(expected=RequestException.class)
  public void updateMediaItemWithoutId() throws RequestException, IOException {
    Client client = new Client(new MySpaceProvider(),
        new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));

    MediaItem mediaItem = new MediaItem();
    mediaItem.setAlbumId("myspace.com.album.81886");
    mediaItem.setUrl("http://www.google.com/intl/en_ALL/images/logo.gif");
View Full Code Here

  }

  @Test(expected=RequestException.class)
  public void updateMediaItemWithoutAlbumId() throws RequestException,
      IOException {
    Client client = new Client(new MySpaceProvider(),
        new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));

    MediaItem mediaItem = new MediaItem();
    mediaItem.setId("myspace.com.mediaItem.image.646364");
    mediaItem.setUrl("http://www.google.com/intl/en_ALL/images/logo.gif");
View Full Code Here

  private static final String MYSPACE_ID = "495184236";

  @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();
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();
View Full Code Here

  }

  @Test
  public void createAlbum() {
    try {
      Client client = new Client(new MySpaceProvider(),
          new OAuth2LeggedScheme(MYSPACE_KEY, MYSPACE_SECRET, MYSPACE_ID));

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

TOP

Related Classes of org.opensocial.providers.MySpaceProvider

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.