2011-10-16 17:20:38 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Flickr-API2
|
|
|
|
#
|
2016-07-08 16:58:15 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-10-16 17:20:38 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2011-04-30 00:02:24 +00:00
|
|
|
Name: perl-Flickr-API2
|
2016-07-08 16:58:15 +00:00
|
|
|
Version: 2.50
|
2011-04-30 00:02:24 +00:00
|
|
|
Release: 0
|
2015-04-17 17:19:28 +00:00
|
|
|
%define cpan_name Flickr-API2
|
2011-04-30 00:02:24 +00:00
|
|
|
Summary: Perl interface to the Flickr API
|
2015-04-17 17:19:28 +00:00
|
|
|
License: Artistic-1.0 or GPL-1.0+
|
2011-04-30 00:02:24 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2015-04-17 17:19:28 +00:00
|
|
|
Url: http://search.cpan.org/dist/Flickr-API2/
|
|
|
|
Source0: http://www.cpan.org/authors/id/T/TJ/TJC/%{cpan_name}-%{version}.tar.gz
|
|
|
|
Source1: cpanspec.yml
|
|
|
|
BuildArch: noarch
|
2011-10-16 17:20:38 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-04-17 17:19:28 +00:00
|
|
|
BuildRequires: perl
|
2011-04-30 00:02:24 +00:00
|
|
|
BuildRequires: perl-macros
|
|
|
|
BuildRequires: perl(Compress::Zlib)
|
2015-04-17 17:19:28 +00:00
|
|
|
BuildRequires: perl(Encode::Base58)
|
2011-04-30 00:02:24 +00:00
|
|
|
BuildRequires: perl(HTTP::Message) >= 1.56
|
2015-04-17 17:19:28 +00:00
|
|
|
BuildRequires: perl(HTTP::Request)
|
2011-04-30 00:02:24 +00:00
|
|
|
BuildRequires: perl(HTTP::Response)
|
|
|
|
BuildRequires: perl(JSON)
|
2015-04-17 17:19:28 +00:00
|
|
|
BuildRequires: perl(LWP::Online)
|
|
|
|
BuildRequires: perl(LWP::Protocol::https)
|
|
|
|
BuildRequires: perl(LWP::UserAgent)
|
2016-07-08 16:58:15 +00:00
|
|
|
BuildRequires: perl(Moo)
|
2015-04-17 17:19:28 +00:00
|
|
|
BuildRequires: perl(Retry)
|
|
|
|
BuildRequires: perl(Test::Exception)
|
|
|
|
BuildRequires: perl(URI) >= 1.18
|
|
|
|
BuildRequires: perl(parent)
|
2011-04-30 00:02:24 +00:00
|
|
|
Requires: perl(Compress::Zlib)
|
2015-04-17 17:19:28 +00:00
|
|
|
Requires: perl(Encode::Base58)
|
2011-04-30 00:02:24 +00:00
|
|
|
Requires: perl(HTTP::Message) >= 1.56
|
2015-04-17 17:19:28 +00:00
|
|
|
Requires: perl(HTTP::Request)
|
2011-04-30 00:02:24 +00:00
|
|
|
Requires: perl(HTTP::Response)
|
|
|
|
Requires: perl(JSON)
|
2015-04-17 17:19:28 +00:00
|
|
|
Requires: perl(LWP::Protocol::https)
|
|
|
|
Requires: perl(LWP::UserAgent)
|
2016-07-08 16:58:15 +00:00
|
|
|
Requires: perl(Moo)
|
2015-04-17 17:19:28 +00:00
|
|
|
Requires: perl(Retry)
|
|
|
|
Requires: perl(URI) >= 1.18
|
|
|
|
Requires: perl(parent)
|
|
|
|
Recommends: perl(JSON::XS)
|
|
|
|
%{perl_requires}
|
2011-04-30 00:02:24 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A simple interface for using the Flickr API.
|
2015-04-17 17:19:28 +00:00
|
|
|
|
2011-04-30 00:02:24 +00:00
|
|
|
The API calls are made via Perl helper methods, and the data returned is
|
2015-04-17 17:19:28 +00:00
|
|
|
converted into Perl objects that can have further methods called upon them.
|
|
|
|
|
|
|
|
So for instance, you can fetch a user by username, by:
|
|
|
|
|
|
|
|
my $user = $api->people->findByUsername('wintrmute')
|
|
|
|
|
|
|
|
You can then ask for photos by that user, by calling:
|
|
|
|
|
|
|
|
my @photos = $user->getPublicPhotos;
|
|
|
|
|
|
|
|
And from there, you can query titles, URLs, etc of the photos with methods
|
|
|
|
such as:
|
|
|
|
|
|
|
|
$photos[0]->title
|
|
|
|
|
|
|
|
So far only a few helper methods have been written, but more are coming.
|
|
|
|
Patches adding functionality will be greatly appreciated!
|
2011-04-30 00:02:24 +00:00
|
|
|
|
|
|
|
%prep
|
2015-04-17 17:19:28 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2011-04-30 00:02:24 +00:00
|
|
|
|
|
|
|
%build
|
2015-04-17 17:19:28 +00:00
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{__make} test
|
2011-04-30 00:02:24 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
2015-04-17 17:19:28 +00:00
|
|
|
%perl_gen_filelist
|
2011-04-30 00:02:24 +00:00
|
|
|
|
2015-04-17 17:19:28 +00:00
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,755)
|
|
|
|
%doc Changes README
|
2011-04-30 00:02:24 +00:00
|
|
|
|
2011-10-16 17:20:38 +00:00
|
|
|
%changelog
|