2011-10-16 17:20:38 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Flickr-API2
|
|
|
|
#
|
2024-07-21 20:35:14 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
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.
|
|
|
|
|
2024-07-21 20:35:14 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-10-16 17:20:38 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-07-21 20:35:14 +00:00
|
|
|
%define cpan_name Flickr-API2
|
2011-04-30 00:02:24 +00:00
|
|
|
Name: perl-Flickr-API2
|
2024-07-21 20:35:14 +00:00
|
|
|
Version: 2.500.0
|
2011-04-30 00:02:24 +00:00
|
|
|
Release: 0
|
2024-07-21 20:35:14 +00:00
|
|
|
# 2.50 -> normalize -> 2.500.0
|
|
|
|
%define cpan_version 2.50
|
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
|
|
Summary: Perl bindings to Flickr API
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/T/TJ/TJC/%{cpan_name}-%{cpan_version}.tar.gz
|
2015-04-17 17:19:28 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:14:15 +02:00
|
|
|
Source100: README.md
|
2015-04-17 17:19:28 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
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)
|
2024-07-21 20:35:14 +00:00
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.59
|
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)
|
2024-07-21 20:35:14 +00:00
|
|
|
Provides: perl(Flickr::API2) = %{version}
|
|
|
|
Provides: perl(Flickr::API2::Base)
|
|
|
|
Provides: perl(Flickr::API2::Interestingness)
|
|
|
|
Provides: perl(Flickr::API2::People)
|
|
|
|
Provides: perl(Flickr::API2::Photo)
|
|
|
|
Provides: perl(Flickr::API2::Photos)
|
|
|
|
Provides: perl(Flickr::API2::Raw)
|
|
|
|
Provides: perl(Flickr::API2::Request) = 2.0.0
|
|
|
|
Provides: perl(Flickr::API2::Test)
|
|
|
|
Provides: perl(Flickr::API2::User)
|
|
|
|
%undefine __perllib_provides
|
2015-04-17 17:19:28 +00:00
|
|
|
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
|
2024-07-21 20:35:14 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
2011-04-30 00:02:24 +00:00
|
|
|
|
|
|
|
%build
|
2024-07-21 20:35:14 +00:00
|
|
|
PERL_USE_UNSAFE_INC=1 perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%make_build
|
2015-04-17 17:19:28 +00:00
|
|
|
|
|
|
|
%check
|
2024-07-21 20:35:14 +00:00
|
|
|
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
|
|
|
|
%doc Changes README
|
2011-04-30 00:02:24 +00:00
|
|
|
|
2011-10-16 17:20:38 +00:00
|
|
|
%changelog
|