Auto-delete after a certain date - soundcloud

I'm looking to use Soundcloud to promote some upcoming events - I'll have a separate sound file promoting each event. I'd like the soundfiles to auto-delete once the events have happened. Is there a way of setting a Kill Date field so that after a certain date, the sound file will delete.

You could certainly use the API to delete these tracks using whatever logic you need, but there's no feature built-in to SoundCloud to do this automatically.
Here is the documentation for the API: http://developers.soundcloud.com/docs/api/reference#tracks
You'd have to be authenticated (obviously), and then send a DELETE request to /tracks/{id}

Related

Firebase cloud functions chess game Swift

I am making a chess app which has a Firebase backend, i am using cloud firestore and cloud functions. basically i am using node 8 to avoid billing issues on cloud functions, i can call and trigger, but i can't wrap my head about how to make an action happen on another device instead of on my own.
After authenticating and logging in, the user gets into a lobby which is a tableViewController and there are shown only the users that are currently logged in.
What i want to achieve is by tapping on a certain row the user that got the tap on it gets an alert shown for him which states whether he accepts the challenge or he declines it. Based on that i proceed to the game or do something else.
The question is though how to make this alert trigger on the other user's device?
Also i've seen some posts that it can be done with snapshotListener on a document, but again i run into the problem of understanding how to trigger the alert on another device. If you've got some other good ideas please share!
Thank you for any feedback!
I think snapshot listeners are really the only way to go. You could use other Firebase services but those aren’t the right tools for the job. Consider creating a collection, maybe call it requests:
[requests]
<userId-userId> (recipientUserId-initiatorUserId)
initiator: string
recipient: string
date: date
Each user has a snapshot listener that listens to this collection where their own userId is equal to recipient. You can add a date field to sort the list by most recent, for example. When a user wants to challenge another user, all they need to do is create a document in this collection:
<userId-userId> (recipientUserId-initiatorUserId)
initiator: myUserId
recipient: theirUserId
date: now
And the recipient's client will instantly see this document.
You could include dressing data in this document, like the initiator's display name or a path to their avatar. But this data may be stale by the time it's rendered so the alternative is to fetch the dressing data from the database using the userId. You could also auto-gen the document ID but if you configure it (like this), it can make operations like deleting simpler. You could also configure the userIds to be alphanumerical so only one request can exist between two users; but if they requested each other at the same time, one would overwrite the other and you'd have to handle that potential edge case. There are lots of things to consider but this is the starting point.

Is it possible (again) to collect event data from Facebook API?

I run an event platform and am looking for a way to retrieve event data (name, date, location, description, etc.) from different events (festivals) on Facebook.
We were working on a connection when the Cambridge Analytica thing happened. Since then my developers have not found a new way to retrieve info, but I'm a bit skeptical.
As of now, it is not possible to get Page Events (which you want to get, i assume):
This is a restricted edge. You cannot request access at this time.
Source: https://developers.facebook.com/docs/graph-api/reference/page/events/

XSMTP API Filters others events than opentrack and clicktracking

Reading the XSMTP API documentation i can see that is possible suppress the open event and click events using webhooks in a per message basis. We have a requirement to disable all hooks for some messages. Is that possible? If yes how i can do it?
You would have to implement this yourself. One easy way would be to add a noEvents category to the messages that you don't want to track. Then in your webhook callback, if the event contains the category noEvents, skip it.

How can I track current Follow/Unfollow events on Github API?

Github API V3 Documenatation states:
FollowEvent
Triggered when a user follows another user.
Events of this type are no longer created, but it’s possible that they
exist in timelines of some users.
Beside of wondering why those events are not being created, is there other way I can track when and who does user decide follow (and unfollow) through the github API?
The only other API I can think of around this is the List users followed by another user endpoint, but that won't give you timestamps and unfollow events - you'd have to do that work yourself...

prevent duplicate publishing of watch action on facebook

I have successfully implemented Facebook watch action on my website. The problem is that every time I open a particular video, depending on how many times I do it, it records each of these as separate watch actions. I would like to record the watch action only once for each unique video. How would I go about doing this?
1) Check in your own database to see if you've already published that action against that object and simply don't post it twice - you'll already be logging this because it's necessary to store the action instance IDs to remove the watch actions later if the user requests you to
2) Set the action as unique in the OG settings for the action. This may not apply to built-in actions, i'm not 100% sure, but in the general case you can mark an action as 'unique' and it'll only be possible to publish once per action/object combo for a user