The MembershipMethods class contains the methods requried for making calls to the API related to memberships.
Esempio n. 1
0
        /// <summary>
        /// <para>Performs the membership method:
        /// Retrieve a member’s profile data.
        /// Creates a query string using the member id provided.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="id">The members id.</param>
        /// <returns>MemberProfile.</returns>
        public MemberProfile MemberProfileById(string id)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberProfileById(id);
        }
Esempio n. 2
0
        /// <summary>
        /// <para>Performs the membership method:
        /// Retrieve a member’s profile data
        /// using the "query" string provided - should be the  "Member/{member_id}/Profile.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>MemberProfile.</returns>
        public MemberProfile MemberProfileByQueryString(string query)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberProfileByQueryString(query);
        }
Esempio n. 3
0
        /// <summary>
        /// <para>Performs the Membership Method:
        /// Retrieve a member’s listings
        /// </para><para>using the "query" string provided - should be the  "Member/{member_id}/Listings.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>Listings.</returns>
        public Listings MemberListings(string query)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberListings(query);
        }
Esempio n. 4
0
        /// <summary>
        /// <para>Performs the Membership Method:
        /// Retrieve a member’s listings.
        /// </para><para>Creates a query string using the parameters provided.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="id">The members id.</param>
        /// <returns>Listings.</returns>
        public Listings MemberListingsById(string id)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberListingsById(id);
        }
Esempio n. 5
0
        /// <summary>
        /// <para>Performs the Membership Method:
        /// Retrieve member ID.
        /// </para><para>Creates a query string using the nickname parameter provided
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="nickname">The members nickname.</param>
        /// <returns>MemberId.</returns>
        public MemberId MemberIdByNickname(string nickname)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberIdByNickname(nickname);
        }
Esempio n. 6
0
        /// <summary>
        /// <para>Performs the Membership Method:
        /// Retrieve member ID
        /// </para><para>using the "query" string provided - should be the  "Member/{member_nickname}.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/". 
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>MemberId.</returns>
        public MemberId MemberId(string query)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberId(query);
        }
Esempio n. 7
0
        /// <summary>
        /// <para>Performs the membership method:
        /// Retrieve member feedback summary (counts)
        /// using the "query" string provided - should be the  "Search/Member/{member_id}/FeedbackCount.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>FeedbackCount.</returns>
        public FeedbackCount MemberFeedbackCountByQueryString(string query)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberFeedbackCountByQueryString(query);
        }
Esempio n. 8
0
        /// <summary>
        /// <para>Performs the membership method:
        /// Retrieve member feedback summary (counts).
        /// </para><para>
        /// Creates a query string using the member id provided.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="id">The members id.</param>
        /// <returns>FeedbackCount.</returns>
        public FeedbackCount MemberFeedbackCountById(string id)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberFeedbackCountById(id);
        }
Esempio n. 9
0
        /// <summary>
        /// <para>Performs the Membership Method:
        /// Retrieve feedback for a member.
        /// </para><para>Creates a query string using the parameters provided - the criteria parameter can be null if it is not required for the request. 
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="id">The members id.</param>
        /// <param name="criteria">The criteria.</param>
        /// <returns>Feedback.</returns>
        public Feedback MemberFeedbackById(string id, MemberFeedbackCriteria criteria)
        {
            if (_membership == null)
            {
                _membership = new MembershipMethods(_connection);
            }

            return _membership.MemberFeedbackById(id, criteria);
        }