Android Open Source - xing-android-sdk Xing Api Interface






From Project

Back to project page xing-android-sdk.

License

The source code is released under:

Apache License

If you think the Android project xing-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.hdodenhof.xingapi.internal.communication;
//from  w w  w  .j a  v  a  2 s.  com
import java.util.Date;

import de.hdodenhof.xingapi.internal.response.ActivityWrapper;
import de.hdodenhof.xingapi.internal.response.CommentsWrapper;
import de.hdodenhof.xingapi.internal.response.ContactsWrapper;
import de.hdodenhof.xingapi.internal.response.ConversationWrapper;
import de.hdodenhof.xingapi.internal.response.ConversationsWrapper;
import de.hdodenhof.xingapi.internal.response.IdCardWrapper;
import de.hdodenhof.xingapi.internal.response.LikesWrapper;
import de.hdodenhof.xingapi.internal.response.MessageWrapper;
import de.hdodenhof.xingapi.internal.response.MessagesWrapper;
import de.hdodenhof.xingapi.internal.response.NetworkActivityWrapper;
import de.hdodenhof.xingapi.internal.response.ProfileMessageWrapper;
import de.hdodenhof.xingapi.internal.response.ResultWrapper;
import de.hdodenhof.xingapi.internal.response.SharedContactsWrapper;
import de.hdodenhof.xingapi.internal.response.TagsWrapper;
import de.hdodenhof.xingapi.internal.response.UserWrapper;
import de.hdodenhof.xingapi.internal.response.VisitsWrapper;
import de.hdodenhof.xingapi.models.FindByEmailsResult;
import retrofit.http.DELETE;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.PUT;
import retrofit.http.Path;
import retrofit.http.Query;

public abstract class XingApiInterface {

    static final String BASEPATH = "/v1";

    public interface UserProfiles {

        @GET(BASEPATH + "/users/{id}.json")
        UserWrapper getUser(@Path("userId") String userId, @Query("fields") String fields);

        @GET(BASEPATH + "/users/me.json")
        UserWrapper getMe(@Query("fields") String fields);

        @GET(BASEPATH + "/users/me/idcard.json")
        IdCardWrapper getIdCard();

        @GET(BASEPATH + "/users/find_by_emails.json")
        ResultWrapper<FindByEmailsResult> findByEmails(String emails, @Query("fields") String fields);

    }

    public interface Messages {

        @GET(BASEPATH + "/users/{userId}/conversations.json")
        ConversationsWrapper getConversations(@Path("userId") String userId);

        @POST(BASEPATH + "/users/{userId}/conversations.json")
        ConversationWrapper postConversation(@Path("userId") String userId, @Query("subject") String subject, @Query("content") String content, @Query("recipient_id") String recipientId);

        @GET(BASEPATH + "/users/{userId}/conversations/{conversationId}.json")
        ConversationWrapper getConversation(@Path("userId") String userId, @Path("conversationId") String conversationId);

        @PUT(BASEPATH + "/users/{userId}/conversations/{conversationId}/read")
        String markConversationAsRead(@Path("userId") String userId, @Path("conversationId") String conversationId);

        @GET(BASEPATH + "/users/{userId}/conversations/{conversationId}/messages.json")
        MessagesWrapper getMessages(@Path("userId") String userId, @Path("conversationId") String conversationId);

        @GET(BASEPATH + "/users/{userId}/conversations/{conversationId}/messages/{messageId}.json")
        MessageWrapper getMessage(@Path("userId") String userId, @Path("conversationId") String conversationId, @Path("messageId") String messageId);

        @PUT(BASEPATH + "/users/{userId}/conversations/{conversationId}/messages/{messageId}/read")
        String markMessageAsRead(@Path("userId") String userId, @Path("conversationId") String conversationId, @Path("messageId") String messageId);

        @DELETE(BASEPATH + "/users/{userId}/conversations/{conversationId}/messages/{messageId}/read")
        String markMessageAsUnread(@Path("userId") String userId, @Path("conversationId") String conversationId, @Path("messageId") String messageId);

        @POST(BASEPATH + "/users/{userId}/conversations/{conversationId}/messages.json")
        MessageWrapper postMessage(@Path("userId") String userId, @Path("conversationId") String conversationId, @Query("content") String content);

        @DELETE(BASEPATH + "/users/{userId}/conversations/{conversationId}")
        String deleteConversation(@Path("userId") String userId, @Path("conversationId") String conversationId);

    }

    public interface ProfileMessages {

        @GET(BASEPATH + "/users/{userId}/profile_message.json")
        ProfileMessageWrapper getProfileMessage(@Path("userId") String userId);

        @PUT(BASEPATH + "/users/{userId}/profile_message")
        String setProfileMessage(@Path("userId") String userId, @Query("message") String message, @Query("public") Boolean isPublic);

    }

    public interface Contacts {

        @GET(BASEPATH + "/users/{userId}/contacts.json")
        ContactsWrapper getContacts(@Path("userId") String userId);

        @GET(BASEPATH + "/users/{userId}/contacts/{contactId}/tags")
        TagsWrapper getContactTags(@Path("userId") String userId, @Path("contactId") String contactId);

        @GET(BASEPATH + "/users/{userId}/contacts/shared.json")
        SharedContactsWrapper getSharedContacts(@Path("userId") String userId);

    }

    public interface NetworkFeed {

        @GET(BASEPATH + "/users/{userId}/network_feed.json")
        NetworkActivityWrapper getNetworkFeed(@Path("userId") String userId, @Query("aggregate") Boolean aggregate, @Query("since") Date since, @Query("until") Date until, @Query("user_fields") String userFields);

        @GET(BASEPATH + "/users/{userId}/feed.json")
        NetworkActivityWrapper getUserFeed(@Path("userId") String userId);

        @POST(BASEPATH + "/users/{userId}/status_message.json")
        String postStatusMessage(@Path("userId") String userId, @Query("message") String message);

        @GET(BASEPATH + "/activities/{activityId}.json")
        ActivityWrapper getActivity(@Path("activityId") String activityId);

        @POST(BASEPATH + "/activities/{activityId}/share.json")
        ActivityWrapper shareActivity(@Path("activityId") String activityId, @Query("text") String text);

        @DELETE(BASEPATH + "/activities/{activityId}")
        String deleteActivity(@Path("activityId") String activityId);

        @GET(BASEPATH + "/activities/{activityId}/comments.json")
        CommentsWrapper getComments(@Path("activityId") String activityId);

        @POST(BASEPATH + "/activities/{activityId}/comments.json")
        CommentsWrapper postComment(@Path("activityId") String activityId, @Query("text") String text);

        @DELETE(BASEPATH + "/activities/{activityId}/comments/{commentId}")
        String deleteComment(@Path("activityId") String activityId, @Path("commentId") String commentId);

        @GET(BASEPATH + "/activities/{activityId}/likes.json")
        LikesWrapper getLikes(@Path("activityId") String activityId);

        @PUT(BASEPATH + "/activities/{activityId}/like.json")
        String like(@Path("activityId") String activityId);

        @DELETE(BASEPATH + "/activities/{activityId}/like.json")
        String unlike(@Path("activityId") String activityId);

    }

    public interface ProfileVisits {

        @GET(BASEPATH + "/users/{userId}/visits.json")
        VisitsWrapper getVisits(@Path("userId") String userId);

        @POST(BASEPATH + "/users/{userId}/visits.json")
        VisitsWrapper postVisit(@Path("userId") String userId);

    }

}




Java Source Code List

de.hdodenhof.xingapi.BaseAPI.java
de.hdodenhof.xingapi.ContactsAPI.java
de.hdodenhof.xingapi.MessagesAPI.java
de.hdodenhof.xingapi.NetworkFeedAPI.java
de.hdodenhof.xingapi.ProfileVisitsAPI.java
de.hdodenhof.xingapi.UserProfilesAPI.java
de.hdodenhof.xingapi.XingApiClient.java
de.hdodenhof.xingapi.enums.ActivityAction.java
de.hdodenhof.xingapi.enums.ActivityAggregator.java
de.hdodenhof.xingapi.enums.ActivityObjectType.java
de.hdodenhof.xingapi.enums.ActivityVerb.java
de.hdodenhof.xingapi.enums.Badge.java
de.hdodenhof.xingapi.enums.CarrerLevel.java
de.hdodenhof.xingapi.enums.CompanyIndustry.java
de.hdodenhof.xingapi.enums.CompanySize.java
de.hdodenhof.xingapi.enums.EmploymentStatus.java
de.hdodenhof.xingapi.enums.ErrorName.java
de.hdodenhof.xingapi.enums.FormOfEmployment.java
de.hdodenhof.xingapi.enums.IMAccount.java
de.hdodenhof.xingapi.enums.LanguageSkill.java
de.hdodenhof.xingapi.enums.Language.java
de.hdodenhof.xingapi.enums.PremiumService.java
de.hdodenhof.xingapi.enums.Reason.java
de.hdodenhof.xingapi.enums.UserField.java
de.hdodenhof.xingapi.enums.WebProfile.java
de.hdodenhof.xingapi.exceptions.ApiException.java
de.hdodenhof.xingapi.exceptions.BaseException.java
de.hdodenhof.xingapi.exceptions.ConversionException.java
de.hdodenhof.xingapi.exceptions.NetworkException.java
de.hdodenhof.xingapi.internal.AuthHandler.java
de.hdodenhof.xingapi.internal.OAuthConstants.java
de.hdodenhof.xingapi.internal.communication.ErrorHandler.java
de.hdodenhof.xingapi.internal.communication.SigningOkClient.java
de.hdodenhof.xingapi.internal.communication.XingApiInterface.java
de.hdodenhof.xingapi.internal.response.ActivityWrapper.java
de.hdodenhof.xingapi.internal.response.CommentsWrapper.java
de.hdodenhof.xingapi.internal.response.ContactsWrapper.java
de.hdodenhof.xingapi.internal.response.ConversationWrapper.java
de.hdodenhof.xingapi.internal.response.ConversationsWrapper.java
de.hdodenhof.xingapi.internal.response.IdCardWrapper.java
de.hdodenhof.xingapi.internal.response.LikesWrapper.java
de.hdodenhof.xingapi.internal.response.MessageWrapper.java
de.hdodenhof.xingapi.internal.response.MessagesWrapper.java
de.hdodenhof.xingapi.internal.response.NetworkActivityWrapper.java
de.hdodenhof.xingapi.internal.response.ProfileMessageWrapper.java
de.hdodenhof.xingapi.internal.response.ResponseWrapper.java
de.hdodenhof.xingapi.internal.response.ResultWrapper.java
de.hdodenhof.xingapi.internal.response.SharedContactsWrapper.java
de.hdodenhof.xingapi.internal.response.TagsWrapper.java
de.hdodenhof.xingapi.internal.response.UserWrapper.java
de.hdodenhof.xingapi.internal.response.VisitsWrapper.java
de.hdodenhof.xingapi.internal.util.HTTPUtils.java
de.hdodenhof.xingapi.internal.util.URLUtils.java
de.hdodenhof.xingapi.internal.widget.AuthWebDialog.java
de.hdodenhof.xingapi.models.ActivityObject.java
de.hdodenhof.xingapi.models.Address.java
de.hdodenhof.xingapi.models.ApiError.java
de.hdodenhof.xingapi.models.Award.java
de.hdodenhof.xingapi.models.BirthDate.java
de.hdodenhof.xingapi.models.Bookmark.java
de.hdodenhof.xingapi.models.Comment.java
de.hdodenhof.xingapi.models.CompanyProfileUpdate.java
de.hdodenhof.xingapi.models.CompanyProfile.java
de.hdodenhof.xingapi.models.Company.java
de.hdodenhof.xingapi.models.Contacts.java
de.hdodenhof.xingapi.models.Conversation.java
de.hdodenhof.xingapi.models.Conversations.java
de.hdodenhof.xingapi.models.EducationalBackground.java
de.hdodenhof.xingapi.models.ErrorResponse.java
de.hdodenhof.xingapi.models.Event.java
de.hdodenhof.xingapi.models.FindByEmailsResult.java
de.hdodenhof.xingapi.models.Group.java
de.hdodenhof.xingapi.models.IdCard.java
de.hdodenhof.xingapi.models.JobPosting.java
de.hdodenhof.xingapi.models.Message.java
de.hdodenhof.xingapi.models.Messages.java
de.hdodenhof.xingapi.models.MetaComment.java
de.hdodenhof.xingapi.models.MetaLike.java
de.hdodenhof.xingapi.models.NetworkActivity.java
de.hdodenhof.xingapi.models.PhotoUrls.java
de.hdodenhof.xingapi.models.ProfessionalExperience.java
de.hdodenhof.xingapi.models.ProfileMessage.java
de.hdodenhof.xingapi.models.Results.java
de.hdodenhof.xingapi.models.School.java
de.hdodenhof.xingapi.models.Status.java
de.hdodenhof.xingapi.models.Tag.java
de.hdodenhof.xingapi.models.Tags.java
de.hdodenhof.xingapi.models.Thread.java
de.hdodenhof.xingapi.models.TimeZone.java
de.hdodenhof.xingapi.models.User.java
de.hdodenhof.xingapi.models.Visit.java
de.hdodenhof.xingapi.sample.MainActivity.java
de.hdodenhof.xingapi.sample.OAuthFragment.java
de.hdodenhof.xingapi.sample.ProfileFragment.java
de.hdodenhof.xingapi.typeadapter.ActivityObjectTypeAdapter.java