Examples of NetFlixUserProfile


Examples of org.springframework.social.movies.netflix.api.NetFlixUserProfile

    // not supported   
  }

  @Override
  public void setConnectionValues(NetFlixApi netflixApi, ConnectionValues values) {
    NetFlixUserProfile profile = netflixApi.getUserProfile();
    values.setProviderUserId(profile.getId());
    values.setDisplayName(profile.getFirstName() + " " + profile.getLastName());
  }
View Full Code Here

Examples of org.springframework.social.movies.netflix.api.NetFlixUserProfile

  static class NetFlixUserProfileDeserializer extends JsonDeserializer<NetFlixUserProfile> {
    @Override
    public NetFlixUserProfile deserialize(JsonParser jp, DeserializationContext context) throws IOException, JsonProcessingException {
      JsonNode tree = jp.readValueAsTree();
      JsonNode userNode = tree.get("user");
      return new NetFlixUserProfile(userNode.get("user_id").getValueAsText(),
          userNode.get("first_name").getValueAsText(), userNode.get("last_name").getValueAsText());
    }
View Full Code Here

Examples of org.springframework.social.movies.netflix.api.NetFlixUserProfile

public class NetFlixApiAdapter implements ApiAdapter<NetFlixApi> {

  @Override
  public UserProfile fetchUserProfile(NetFlixApi netflixApi) {
    NetFlixUserProfile profile = netflixApi.getUserProfile();   
    String firstName = profile.getFirstName();
    String lastName = profile.getLastName();
    String fullName = firstName + " " + lastName;
    return new UserProfileBuilder().setFirstName(firstName).setLastName(lastName).setName(fullName).build();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.