Package org.opensocial.auth

Examples of org.opensocial.auth.OAuth2LeggedScheme


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


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

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

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

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

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

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

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

  private static final String ORKUT_ID = "03067092798963641994";

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

  private void singleUpdateAndRetrieveFromOrkut(boolean useRest) {
    Random generator = new Random();
    String randomValue = String.valueOf(generator.nextInt());

    Client client = new Client(new OrkutSandboxProvider(useRest),
        new OAuth2LeggedScheme(ORKUT_KEY, ORKUT_SECRET, ORKUT_ID));

    try {
      Request request = AppDataService.updateAppData("key", randomValue);
      client.send(request);
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.opensocial.auth.OAuth2LeggedScheme

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.