User Profile #1

wants to merge 4 commits into


None yet
2 participants

dlinsin commented Oct 7, 2012

This introduces a method in TPTentClient called getProfileRepresentationWithEntity which retrieves any profile for a given entity URL. It can be used to retrieve the user's profile as well as profiles for any other entities.

As an example I implemented retrieving the logged in user's profile, changing the flow of AccountViewController.

I might use this method in the future to retrieve profiles belonging to posts in TimeLineViewController.


followben commented Oct 8, 2012

Thanks for the work on this @dlinsin - looking forward to merging this one.

Before I do though, can I suggest a couple of tweaks?

TPTentHTTPClient already sets the acceptable content type and accept headers on a request, so I feel the new unauth'ed member should be an instance of that rather than AFHTTPClient. Should simplify things, as you don't need TPTentProfileJSONRequestOperation, nor do you need to modify the accept header after creating the request.

Also, I'm not a fan of libs providing a git ignore. IMHO, ignores, be they via a local or global .gitignore should be left to the consumer. I'd cherry pick all but dlinsin/TPTentClient@868b7d3, but if you're modifying the pull request as above, just leave it off if you can.

Appreciate your help, and let me know what you think...


dlinsin commented Oct 8, 2012

I'll give TPTentHTTPClient a try and remove the git ignore file. If you don't want to wait until I get a chance to modify this PR, just pick whatever you need.


followben commented Oct 8, 2012

Cheers @dlinsin - have done so: 05b0b11.

I went with your original approach in the end, i.e. instantiating a new http client to retrieve the profile. A single non-authed member could cause headaches if messaged from a bg queue.

Thanks once again for all your help.

followben closed this Oct 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment