Forum Discussion

nare03's avatar
nare03
Contributor
13 years ago

PayPal community forum latest posts using REST API

Hi ,

 

I am trying to get the latest posts from the PayPal community forum and I am following steps given here in this link

http://lithosphere.lithium.com/t5/Developers-Knowledge-Base/Obtaining-Latest-Posts-Top-Kudoed-Posts-and-Top-Kudoed-Authors/ta-p/6835

 

I have formed an URL to grep the comments but I am not getting the xml response.

https://www.paypal-community.com/Hot-Topics/restapi/vc/posts/recent

 

Could you please guide me , what I missing or how to form the URL ?

 

Thanks,

Naresh

  • Hi Naresh,

     

    If you mean that you also want to receive the body of the post in addtion to the subject line, you can add this parameter to the end of your current call.

     

    ?restapi.format_detail=full_list_element.

     

    If you want a topic and all its responses, you'll want to make a different call.  For example, this discussion: http://lithosphere.lithium.com/lithium/restapi/vc/threads/id/56362

     

    Does that help?

     

    Scott

9 Replies

  • ScottR's avatar
    ScottR
    Khoros Expert
    13 years ago

    Hi Naresh,

     

    If you mean that you also want to receive the body of the post in addtion to the subject line, you can add this parameter to the end of your current call.

     

    ?restapi.format_detail=full_list_element.

     

    If you want a topic and all its responses, you'll want to make a different call.  For example, this discussion: http://lithosphere.lithium.com/lithium/restapi/vc/threads/id/56362

     

    Does that help?

     

    Scott

  • nare03's avatar
    nare03
    Contributor
    13 years ago

    Hi Scott,

     

    https://www.paypal-community.com/ppl/restapi/vc/categories/id/US/posts/recent?restapi.format_detail=full_list_element

     

    When I hit this link, its giving me the recent post(comments) from the forum. Is there anyway, so that I can get the posts for a particular day ?

    We need this, becuase,i am trying to automate(schedule) my job, so that it fetches all the comments in a day and store it in our file system for further processing and i can run again for the next day and so on. If I use the above link, but i am not sure 'recent" means when the new data will get updated or is there any timeframe set to update the data ?

     

    Please let me know, if you need more details.

     

    Thanks,

    Naresh

  • ScottR's avatar
    ScottR
    Khoros Expert
    13 years ago

    Hi again Naresh,

     

    As far as I know, there isn't currently a way to query by date range using the API, slightly more on that here..  A few ways to accomplish what you are trying to do would to be to run the job daily and use the post date in the response XML to determine if the entry should go into the repository. 

     

    An alternative for the purpose you described would be to use the Event Subsription API.

     

    Hope this is useful!

     

    Scott 

  • nare03's avatar
    nare03
    Contributor
    13 years ago

    Thanks scott for your suggestions.

     

    We may go with the idea of checking the duplicate data from the response with the available repository.

    This should be fine.

     

    Naresh