title: $:/plugins/tiddlywiki/geospatial/demo/flickr caption: Flickr tags: $:/tags/Macro $:/tags/GeospatialDemo \procedure flickr-get-items(per_page:"100",page_number:"1",method:"flickr.photosets.getPhotos",resultPhotoRoot:"photoset") \procedure completion() \import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] <$action-log msg="In completion"/> <$action-log/> <$list filter="[compare:number:gteq[200]compare:number:lteq[299]]" variable="ignore"> <$list filter="[jsonindexes,[photo]]" variable="photoIndex"> <$let photoData={{{ [jsonextract,[photo],] }}} photoFarm={{{ [jsonget[farm]] }}} photoServer={{{ [jsonget[server]] }}} photoID={{{ [jsonget[id]] }}} photoSecret={{{ [jsonget[secret]] }}} > <$action-setfield $tiddler={{{ [addprefix[Flickr Photo ]] }}} tags="$:/tags/GeoMarker $:/tags/FlickrPhoto" caption={{{ [jsonget[title]] }}} lat={{{ [jsonget[latitude]] }}} long={{{ [jsonget[longitude]] }}} alt="0" photo-url={{{ [[https://farm]addsuffixaddsuffix[.staticflickr.com/]addsuffixaddsuffix[/]addsuffixaddsuffix[_]addsuffixaddsuffix[_b.jpg]] }}} icon-url={{{ [[https://farm]addsuffixaddsuffix[.staticflickr.com/]addsuffixaddsuffix[/]addsuffixaddsuffix[_]addsuffixaddsuffix[_s.jpg]] }}} /> <$let pages={{{ [jsonget[photos],[pages]] }}} > <$list filter="[compare:number:lt]" variable="ignore"> <$macrocall $name="flickr-get-items" page_page=<> page_number={{{ [add[1]] }}} method=<> resultPhotoRoot=<>/> \end completion \procedure progress() \import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] <$action-log message="In progress-actions"/> \end progress \procedure request-url() https://api.flickr.com/services/rest/ \end request-url <$action-sendmessage $message="tm-http-request" url=<> method="GET" query-method=<> query-extras="geo" query-per_page=<> query-page=<> query-format="json" query-nojsoncallback="1" query-photoset_id={{$:/config/flickr-album}} header-accept="application/json" password-query-api_key="flickr-api-key" bind-status="$:/temp/flickr/status" bind-progress="$:/temp/flickr/progress" oncompletion=<> onprogress=<> var-method=<> var-per_page=<> var-page_number=<> var-resultPhotoRoot=<> /> \end \procedure flickr-get-album-items() <$macrocall $name="flickr-get-items" method="flickr.photosets.getPhotos" resultPhotoRoot="photoset"/> \end \procedure flickr-get-interesting-items() <$macrocall $name="flickr-get-items" method="flickr.interestingness.getList" resultPhotoRoot="photos"/> \end \procedure flickr-actions() <$macrocall $name="flickr-get-album-items"/> \end ! Retrieve Geotagged Flickr Photos Flickr API Key: <$password name="flickr-api-key"/> Flickr album ID: <$edit-text tiddler="$:/config/flickr-album" tag="input"/> <$button> <$macrocall $name="flickr-get-album-items"/> Get Flickr album <$button> <$macrocall $name="flickr-get-interesting-items"/> Get Flickr interesting items