All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.scribe.up.profile.dropbox.DropBoxProfile Maven / Gradle / Ivy

The newest version!
/*
  Copyright 2012 Jerome Leleu

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package org.scribe.up.profile.dropbox;

import java.util.Locale;

import org.scribe.up.profile.AttributesDefinition;
import org.scribe.up.profile.BaseOAuthProfile;
import org.scribe.up.profile.CommonProfile;
import org.scribe.up.profile.Gender;
import org.scribe.up.profile.OAuthAttributesDefinitions;

/**
 * This class is the user profile for DropBox with appropriate getters.
* It is returned by the {@link org.scribe.up.provider.impl.DropBoxProvider}. *

*

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Method :From the JSON profile response :
The attributes of the {@link org.scribe.up.profile.CommonProfile}
String getEmail()null
String getFirstName()null
String getFamilyName()null
String getDisplayName()the display_name attribute
String getUsername()null
Gender getGender(){@link org.scribe.up.profile.Gender#UNSPECIFIED}
Locale getLocale()the country attribute
String getPictureUrl()null
String getProfileUrl()the referral_link attribute
String getLocation()null
More specific attributes
Long getNormal()the normal attribute
Long getQuota()the quota attribute
Long getShared()the shared attribute
* * @see org.scribe.up.provider.impl.DropBoxProvider * @author Jerome Leleu * @since 1.2.0 */ public class DropBoxProfile extends BaseOAuthProfile implements CommonProfile { private static final long serialVersionUID = 818622588110145756L; @Override protected AttributesDefinition getAttributesDefinition() { return OAuthAttributesDefinitions.dropBoxDefinition; } public String getEmail() { return null; } public String getFirstName() { return null; } public String getFamilyName() { return null; } public String getDisplayName() { return (String) get(DropBoxAttributesDefinition.DISPLAY_NAME); } public String getUsername() { return null; } public Gender getGender() { return Gender.UNSPECIFIED; } public Locale getLocale() { return (Locale) get(DropBoxAttributesDefinition.COUNTRY); } public String getPictureUrl() { return null; } public String getProfileUrl() { return (String) get(DropBoxAttributesDefinition.REFERRAL_LINK); } public String getLocation() { return null; } public Long getNormal() { return (Long) get(DropBoxAttributesDefinition.NORMAL); } public Long getQuota() { return (Long) get(DropBoxAttributesDefinition.QUOTA); } public Long getShared() { return (Long) get(DropBoxAttributesDefinition.SHARED); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy