Now I am doing a Swift app by Foursquare. I have to fetch the Venue data and the photo of it at the same time. But the use Foursquare api to fetch the Venue photo data needs the Venue ID, which means cannot do the two fetch together? Can I do that together?
you can use Explore API ... with "venuePhotos=1 filter
like this:
http://api.foursquare.com/v2/venues/explore?ll=54.6872,25.2797&venuePhotos=1
Related
I'm making a Foursquare API call that returns specified venues in a given area. So in my API call I pass in the parameters of a categoryId and a lat and long. I'm trying to find out if I can get all the photos associated with each returned venue within this same call or do I have to make a separate call and pass in the venue specific id?. Here is what my current url for my venue search call looks like:
"https://api.foursquare.com/v2/venues/search?ll=44.7681,-85.6222&categoryId=4bf58dd8d48988d14b941735&v=20130815&client_id=XXXXXX&client_secret=XXXXXX"
Thanks in advance!
If you look at the API documentation for FourSquare, there is a separate API call that is required to retrieve a photo(s) based on the venue id.
https://api.foursquare.com/v2/venues/VENUE_ID/photos
basically I'm struggling with this:
I installed an FacebookAlbumPicker (https://github.com/OceanLabs/FacebookImagePicker-iOS)
Now I try to upload these Images to my PFObject PFUser.currentUser["images"] which should be an array of PFFiles.
Later I want to retrieve them.
When uploading to parse (just one photo for) it gives me a strange documentation of it:
images:array => [{"__type":"File","name":"tfss-c5f07d1f-34a3-4041-bc18-e13237abd077-file","url":"http://files.parsetfss.com/f84a8fda-4aff-45dc-b328-8e46987c191f/tfss-c5f07d1f-34a3-4041-bc18-e13237abd077-file"}]
How can I access this inside CollectionviewCells now?
You cannot store PFFile-objects as Array. Create new class in your Parse app like PhotoObject and there create column file. Then in your User class create column photos which will be array of pointers to PhotoObject class.
And when you want to get images of user you query for photos.
So, I'm working with an app that uses coreData in some of its features. Now, I have a problem with fetching the data from CoreData using a uniqueId and the current date. Also, I will also be getting the data weekly, monthly, and yearly with their corresponding unique id's. Can anyone help me in this? thanks
You should create 2 requests. One request to fetch datas by date, and other request to fetch data by uid.
To create a request, you should use NSFetchRequest (There you can read how to create NSFetchRequest instances and how execute them).
I prefer to create access methods in categories of my models:
#interface CDModel (Access)
+(NSArray)getModelsFromDate:(NSDate*)fromDate toDate:(NSDate*)toDate;
#end
I have the following data model:
And I'd like to have a property on the playlist object that points to its list of songs. Right now I have something like:
self.songs = [self.playlistMemberships valueForKey:#"song"];
But I'm noticing that this is very slow and core data seems to be firing off faults for each individual song. Any thoughts on how to make a single call to pull all the song info? Thanks!
PlaylistMembership just seems to get in the way -- can you relate Playlist to Song directly and cut out the PlaylistMembership? I think that'd let Core Data fetch all the songs at once rather than fetching all the memberships and then having to go back to get each song.
If you can't or prefer not to get rid of the membership entity, use setRelationshipKeyPathsForPrefetching: to specify that song should be fetched along with the membership.
I am currently using Foursquare API to query out a list of venues.
However, I need to query out some specific venue that are "managed". (Managed means the venues whose owners have a Foursquare account and use Foursquare for the business)
However, I can't use the way in "https://developer.foursquare.com/docs/venues/managed" to get the result because it is only for the current user.
I check the venue search response and found that there is a value called "verified"(https://developer.foursquare.com/docs/responses/venue). Is that means "managed"?
The "verified" attribute indicates that the venue has been claimed by its owner. See https://developer.foursquare.com/docs/responses/venue for more information.