title: $:/plugins/tiddlywiki/geospatial/macros/Flickr tags: $:/tags/Macro \procedure flickr-get-items(per_page:"100",page_number:"1",method:"flickr.photosets.getPhotos",paramName:"group_id",paramValue:"",resultPhotoRoot:"photoset",photoTiddlerTemplate:"$:/plugins/tiddlywiki/geospatial/macros/Flickr/DefaultPhotoTemplate") \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]] }}} photoTiddlerTitleFilter={{{ [getindex[title]] }}} photoTiddlerTitle={{{ [subfilter] }}} > <$list filter="[indexes[]]" variable="fieldName"> <$let fieldValueFilter={{{ [getindex] }}}> <$action-log $tiddler=<> $field=<> $value={{{ [subfilter] }}} /> <$action-setfield $tiddler=<> $field=<> $value={{{ [subfilter] }}} /> <$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=<> photoTiddlerTemplate=<>/> \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" $names="[addprefix[query-]]" $values=<> 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=<> var-photoTiddlerTemplate=<> /> \end \procedure flickr-get-photos-of-user-items(userID) <$macrocall $name="flickr-get-items" method="flickr.people.getPhotosOf" paramName="user_id" paramValue=<> resultPhotoRoot="photos"/> \end \procedure flickr-get-group-items(groupID) <$macrocall $name="flickr-get-items" method="flickr.groups.pools.getPhotos" paramName="group_id" paramValue=<> resultPhotoRoot="photos"/> \end \procedure flickr-get-album-items(albumID) <$macrocall $name="flickr-get-items" method="flickr.photosets.getPhotos" paramName="photoset_id" paramValue=<> resultPhotoRoot="photoset"/> \end \procedure flickr-get-interesting-items() <$macrocall $name="flickr-get-items" method="flickr.interestingness.getList" resultPhotoRoot="photos"/> \end