GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
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.
Added method to retrieve a Tent entity's profile
Added the user's profile after authentication
Added git ignore file
Created a member for no auth AFNetowrking calls
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...
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.
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.