Package org.opensocial

Examples of org.opensocial.Request


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

      Request request = StatusMoodsService.getStatus();
      Response response = client.send(request);

      StatusMood statusMood = response.getEntry();
      assertTrue(statusMood.getMoodId() != null);
      assertTrue(statusMood.getStatus() != null);
View Full Code Here


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

      Request request = StatusMoodsService.getFriendStatuses("@me");
      Response response = client.send(request);

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

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

      Request request = StatusMoodsService.getSupportedMood(90);
      Response response = client.send(request);

      StatusMood mood = response.getEntry();
      assertTrue(mood.getMoodId() != null);
      assertTrue(mood.getMoodId().equals("90"));
View Full Code Here

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

      Request request = StatusMoodsService.getSupportedMoods();
      Response response = client.send(request);

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

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

      Request request = StatusMoodsService.getStatusHistory();
      Response response = client.send(request);

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

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

      Request request =
        StatusMoodsService.getFriendStatusHistories();
      Response response = client.send(request);

      List<StatusMood> statusMoods = response.getEntries();
      assertTrue(statusMoods != null);
View Full Code Here

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

      Request request = StatusMoodsService.getFriendStatusHistory(
          "myspace.com.person.63129100");
      Response response = client.send(request);

      List<StatusMood> statusMoods = response.getEntries();
      assertTrue(statusMoods != null);
View Full Code Here

      StatusMood statusMood = new StatusMood();
      statusMood.setStatus("Working on the Java SDK");
      statusMood.setMoodId(90);

      Request request = StatusMoodsService.updateStatus(statusMood);
      client.send(request);

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

  @BeforeClass
  public static void setup() {
    Client client = new Client(new OrkutSandboxProvider(),
        new OAuth2LeggedScheme(ORKUT_KEY, ORKUT_SECRET, ORKUT_ID));
    try {
      Request request = AppDataService.updateAppData("java", "rocks");
      client.send(request);
    } catch (Exception e) {
    }
  }
View Full Code Here

  private void retrieveFromOrkut(boolean useRest) {
    try {
      Client client = new Client(new OrkutSandboxProvider(useRest),
          new OAuth2LeggedScheme(ORKUT_KEY, ORKUT_SECRET, ORKUT_ID));
      Request request = AppDataService.getAppData();
      Response response = client.send(request);

      AppData data = response.getEntry();
      assertTrue(data.hasField(ORKUT_ID));
    } catch (Exception e) {
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.