Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/inferno/module/Flickr.m

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.




Host : con "api.flickr.com";
IP : con "68.142.214.24";
RESTForm : con "/services/rest/";
AuthForm : con "/services/auth/";
UploadForm : con "/services/upload/";

Flickr: module
{
	PATH : con "/dis/lib/Flickr.dis";
	Parameter : adt {
		name : string;
		value : string;
	};

	Auth : adt {
		secret : string;
		apikey : string;
		token : string;
		get_frob : fn(a : self ref Auth) : string;
		get_token : fn(a: self ref Auth) : string;
		check_token : fn(a: self ref Auth);
	};

	Photopage : adt {
		page : int;
		pages : int;
		perpage : int;
		total : int;
		photos : list of ref Photo;
		to_string : fn(p: self ref Photopage) : string;
	};

	Photo : adt {
		id : string;
		owner : string;
		secret : string;
		server : string;
		farm : string;
		title : string;
		ispublic : int;
		isfriend : int;
		isfamily : int;
		to_string : fn(p: self ref Photo) : string;
	};

	Category : adt {
		id : int;
		parent : int;
		name : string;
		count : int;
		to_string : fn(c: self ref Category) : string;
	};

	Group : adt {
		nsid : string;
		name : string;
		members : int;
		to_string : fn(g : self ref Group) : string;
	};

	init:fn();
	get_favourites : fn(a : ref Auth, per_page, page_no : int) : ref Photopage;
	groups_browse : fn(a: ref Auth, category_id : int) : (list of ref Category, list of ref Group);
	upload_jpeg : fn(a : ref Auth, filename, title, description, tags, public : string) : string;
	my_recently_posted_photos : fn(a: ref Auth, per_page, page_no : int) : ref Photopage;
};


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].