public Response subscribe ( String topic , String callbackUrl , JinxConstants . VerificationMode mode , String verificationToken , Integer leaseSeconds , Integer woeIds , List < String > placeIds , Float latitude , Float longitude , Integer radius , JinxConstants . RadiusUnits radiusUnits , Integer accuracy , List < String > commonsNSIDs , List < String > tags ) throws JinxException { JinxUtils . validateParams ( topic , callbackUrl , mode ) ; Map < String , String > params = new TreeMap <> ( ) ; params . put ( "method" , "flickr.push.subscribe" ) ; params . put ( "topic" , topic ) ; params . put ( "callback" , callbackUrl ) ; params . put ( "verify" , mode . toString ( ) ) ; if ( ! JinxUtils . isNullOrEmpty ( verificationToken ) ) { params . put ( "verify_token" , verificationToken ) ; } if ( leaseSeconds != null && leaseSeconds > 59 ) { params . put ( "lease_seconds" , leaseSeconds . toString ( ) ) ; } if ( woeIds != null ) { params . put ( "woe_ids" , woeIds . toString ( ) ) ; } if ( ! JinxUtils . isNullOrEmpty ( placeIds ) ) { params . put ( "place_ids" , JinxUtils . buildCommaDelimitedList ( placeIds ) ) ; } if ( latitude != null ) { params . put ( "lat" , latitude . toString ( ) ) ; } if ( longitude != null ) { params . put ( "lon" , longitude . toString ( ) ) ; } if ( radius != null ) { params . put ( "radius" , radius . toString ( ) ) ; } if ( radiusUnits != null ) { params . put ( "radius_units" , radiusUnits . toString ( ) ) ; } if ( accuracy != null ) { params . put ( "accuracy" , accuracy . toString ( ) ) ; } if ( ! JinxUtils . isNullOrEmpty ( commonsNSIDs ) ) { params . put ( "nsids" , JinxUtils . buildCommaDelimitedList ( commonsNSIDs ) ) ; } if ( ! JinxUtils . isNullOrEmpty ( tags ) ) { params . put ( "tags" , JinxUtils . buildCommaDelimitedList ( tags ) ) ; } return jinx . flickrGet ( params , Response . class ) ; }
Subscribe to a push feed .