Snapchat "SnapMap" Geolocation Sensors

I don’t personally have a need for this at all, but I stumbled across this API and thought it would be cool.

With this API the main thing of interest is that you can query videos posted to the snapmap (https://map.snapchat.com) within a radius of a particular location.

I think it could be really cool to be able to set up some sort of sensor to grab those videos and publish an event into home assistant when a new video gets posted to a specific area.

For example, a business owner could monitor the immediate radius around their business and get a notification of videos posted at their business.

I’m also thinking that as a social media manager for a “shop local” group I could monitor a bunch of business locations and set up filters based on tags the videos have, to automatically download and push me a notification of the video being posted to help cross promote the business using those clips.

And just cause after posting this and thinking about it more I think it’s an amazing idea and now I really want this…

Here’s the configuration sample

sensor:
  - platform: snapmap
    name: "Bob's Burgers" #optional
    latitude: 40.044167
    longitude: -86.140940
    radius: 50 #optional default is 50
    locale: "us" #optional, us is default. This would coorelate to the locales available for the titles of each playlist item in the api
  - platform: snapmap
    name: "Grand Central Perk"
    latitude: 41.217205
    longitude: -86.774666
    radius: 50

And I’d expect the entity to be like this

Entity ID: sensor.snapmap_bobs_burgers
State: 2 (this would be the number of items in the playlist)
Attributes:

unit_of_measurement: items
latitude: 40.044167
longitude: -86.140940
playlist:
- title: Indianapolis, Indiana
  id: W7_EDlXWTBiXAEEniNoMPwAAYymZ1eVsZ8UqAAXVDiW29AXVDiWyOAO1OAA
  MediaType: video
  video_thumbnail: https://s.sc-cdn.net/RRrwlPoWeQqomAPjpAjQSAVzgvgWSXesnGAyxJmPa_M=/default/thumb/thumb.mp4
  image_thumbnail: https://s.sc-cdn.net/RRrwlPoWeQqomAPjpAjQSAVzgvgWSXesnGAyxJmPa_M=/default/thumb/thumb.jpg
  mediaUrl: https://s.sc-cdn.net/RRrwlPoWeQqomAPjpAjQSAVzgvgWSXesnGAyxJmPa_M=/default/media.mp4
  timestamp: 1603154302000
- title: Indianapolis, Indiana
  id: W7_EDlXWTBiXAEEniNoMPwAAYpEGUP0F5bWyyAXVDcD1hAXVDcDyxAO1OAA
  snapMediaType: photo
  image_thumbnail: https://s.sc-cdn.net/RRrwlPoWeQqomAPjpAjQSAVzgvgWSXesnGAyxJmPa_M=/default/thumb/thumb.jpg
  mediaUrl: https://s.sc-cdn.net/826Eeseojcchpwk4SYc4Nun2usVVXc9-MA-gH-ygaxs=/default/media.jpg?Expires=1610930562&KeyName=test-key&Signature=isJ_3iK1eeV1Lw0myhEJx5yifwQ=
  timestamp: 1603154332000 
1 Like