Skip to content

Commit

Permalink
Merge pull request #2 from upwork/v2.1.0
Browse files Browse the repository at this point in the history
v2.1.0
  • Loading branch information
mnovozhylov committed Oct 21, 2019
2 parents 0ede5e5 + 1c953e1 commit f5d371e
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 13 deletions.
1 change: 1 addition & 0 deletions .tests
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./Build test
11 changes: 1 addition & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
language: perl
perl:
- "5.30"
- "5.28"
- "5.26"
- "5.20"
- "5.20-shrplib"
- "5.18"
- "5.18-shrplib"
- "5.16"
- "5.14"
- "5.12"
- "5.10"
- "5.8"
notifications:
email:
recipients:
Expand Down
2 changes: 1 addition & 1 deletion Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ my $builder = Module::Build->new(
module_name => 'Net::Upwork::API',
license => 'apache',
dist_author => 'Maksym Novozhylov <mnovozhilov@upwork.com>',
dist_version => '2.0.2',
dist_version => '2.1.0',
dist_abstract => 'Perl bindings for Upwork API (OAuth2)',
build_requires => {
'Test::More' => '0.66',
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.0
* Add Specialties API
* Add Skills V2 API

## 2.0.2
* Set library User-Agent

Expand Down
2 changes: 1 addition & 1 deletion lib/Net/Upwork/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use warnings;
use Net::Upwork::API::Config;
use Net::Upwork::API::Client;

our $VERSION = '2.0.2';
our $VERSION = '2.1.0';

use constant TOKEN_TYPE_BEARER => 'Bearer';

Expand Down
32 changes: 32 additions & 0 deletions lib/Net/Upwork/API/Routers/Metadata.pm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,38 @@ sub get_skills {
return $self->client()->get("/profiles/v1/metadata/skills");
}

=item get_skills_v2
Get skills V2
B<Return value>
JSON response as a string
=cut

sub get_skills_v2 {
my $self = shift;

return $self->client()->get("/profiles/v2/metadata/skills");
}

=item get_specialties
Get specialties
B<Return value>
JSON response as a string
=cut

sub get_specialties {
my $self = shift;

return $self->client()->get("/profiles/v1/metadata/specialties");
}

=item get_regions
Get regions
Expand Down
4 changes: 3 additions & 1 deletion t/05.routers_metadata.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env perl
use strict;
use Test::More tests => 6;
use Test::More tests => 8;
use lib qw(lib);
use Net::Upwork::API::Routers::Metadata;

can_ok('Net::Upwork::API::Routers::Metadata', 'new');
can_ok('Net::Upwork::API::Routers::Metadata', 'get_categories_v2');
can_ok('Net::Upwork::API::Routers::Metadata', 'get_skills');
can_ok('Net::Upwork::API::Routers::Metadata', 'get_skills_v2');
can_ok('Net::Upwork::API::Routers::Metadata', 'get_specialties');
can_ok('Net::Upwork::API::Routers::Metadata', 'get_regions');
can_ok('Net::Upwork::API::Routers::Metadata', 'get_tests');
can_ok('Net::Upwork::API::Routers::Metadata', 'get_reasons');

0 comments on commit f5d371e

Please sign in to comment.