-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- actual content 4squatterrc-sample.txt - misc. documentation and notes foursquatter.pl - misc cleanup and usage notes
- Loading branch information
Showing
3 changed files
with
113 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# since this stores your foursquare password in clear text, make sure that you | ||
# put the appropriate permissions in place. | ||
# foursquare account username - can also be the registered phone # | ||
esquare_user = "[email protected]" | ||
# foursquare account password | ||
esquare_pass = "secretpassword" | ||
esquare_host = "api.foursquare.com:80" | ||
# the user-agent | ||
esquare_agent = "foursquatter 0.01" | ||
# if you're going to use the batch check-in functionality this is where we | ||
# would store the file containing the list of venues you'd like to update en | ||
# masse | ||
esquare_vfile = "/path_to_home/squatter-venues.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
* overview | ||
|
||
warning - this is an anti-social script. i'm not recommending its use, but i | ||
can see the utility. if you must have the mayorship of your local | ||
bar/coffeeshop, etc. you might find it useful. this exercises a very little | ||
bit of the foursquare API and allows you to interact with the API. | ||
|
||
* requirements | ||
|
||
- libwww-perl - this has the HTTP client functionality, commonly available. | ||
- JSON - used to parse the responses from foursquare | ||
|
||
* configuration | ||
|
||
you'll want to make sure that you create the appropriate .4squatterrc file | ||
with the right username and password, etc. put into place. | ||
|
||
* seeding the process | ||
|
||
in order to seed the process you should dig up the latitude and longitude of | ||
the area where you'd like to poke around. then get the list of the venues | ||
that are nearby. | ||
|
||
|
||
ZenDoggy[sulrich]% foursquatter.pl --action=disp_venues --geolat=44.9116 \ | ||
--geolong=-93.329 | ||
|
||
# vid venue name geolat geolong | ||
#--------------------------------------------------------------------- | ||
19098 Edina Grill 44.9116 -93.329 | ||
993195 Bone Adventure 44.9116893 -93.3290071 | ||
477665 Normandale College 44.9117382 -93.3290307 | ||
358183 il vostro boutique 44.9118158 -93.3290075 | ||
31532 Salut Bar Americain - Edina 44.9115 -93.3294 | ||
1450348 Julia Bretey Salon 44.9119001 -93.3290077 | ||
691615 Gyropolis 44.9114999 -93.3294 | ||
1025052 James Loren Salon 44.9118 -93.3294 | ||
493299 New China Wok 44.9120019 -93.329008 | ||
52142 Premier Cheese Market 44.912 -93.329 | ||
|
||
redirect the output to the file that you'd like to use to be the see for batch updates. | ||
|
||
|
||
ZenDoggy[sulrich]% foursquatter.pl --action=disp_venues --geolat=44.9116 \ | ||
--geolong=-93.329 --vcount=30 > foo-venues.txt | ||
|
||
edit this file to add/remove the venues that you have in the mix. note that | ||
the fields are tab delimited. make sure you don't rip out the tabs when you | ||
save the file. | ||
|
||
batch file format: | ||
vid <tab> name <tab> <geolat> <tab> <geolong> <newline> | ||
|
||
lines starting with a hash are ignored as comments. | ||
|
||
|
||
|
||
|
||
* single shot check-in | ||
|
||
for this, all you need to provide is the | ||
|
||
ZenDoggy[sulrich]% foursquatter.pl --action=checkin --vid=31532 | ||
checkin success: 31532 - <note this will be blank in the single shot mode> | ||
|
||
* batch check-in | ||
|
||
ZenDoggy[sulrich]% foursquatter.pl --action=checkin-batch | ||
checkin success: 19098 - Edina Grill | ||
|
||
... elided for brevity ... | ||
|
||
checkin success: 227616 - Starbucks | ||
checkin success: 701995 - Bella Salon and Spa | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters