Client/Container.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Client/Collection.pm ↑ Summary Client/Formatter.pm »
1 package Net::OpenSocial::Client::Container;
2  
3 1 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 has 'request_token_endpoint' => (
6 is => 'ro',
7 isa => 'Str',
8 );
9  
10 1 has 'authorize_endpoint' => (
11 is => 'ro',
12 isa => 'Str',
13 );
14  
15 1 has 'access_token_endpoint' => (
16 is => 'ro',
17 isa => 'Str',
18 );
19  
20 1 has 'rest_endpoint' => (
21 is => 'ro',
22 isa => 'Str',
23 );
24  
25 1 has 'rpc_endpoint' => (
26 is => 'ro',
27 isa => 'Str',
28 );
29  
30 1 has 'use_request_body_hash' => (
31 is => 'ro',
32 isa => 'Bool',
33 default => 0,
34 );
35  
36 1 ▶no Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
37 1 __PACKAGE__->meta->make_immutable;
38 1 1;
39  
40 =head1 NAME
41  
42 Net::OpenSocial::Client::Container - Container configuration
43  
44 =head1 SYNOPSIS
45  
46 my $container = Net::OpenSocial::Client::Container->new(
47 rest_endpoint => q{http://example.org/rest},
48 rpc_endpoint => q{http://example.org/rpc},
49 use_request_body_hash => 1,
50 );
51  
52 =head1 DESCRIPTION
53  
54 Container confguration and provides some methods to support container specific implementation.
55  
56 =head1 USAGE
57  
58 =head2 BUILD BY YOURSELF
59  
60 my $container = Net::OpenSocial::Client::Container->new(
61 rest_endpoint => q{http://example.org/rest},
62 rpc_endpoint => q{http://example.org/rpc},
63 use_request_body_hash => 1,
64 );
65  
66 =head2 USE SUBCLASS
67  
68 There already exist some major container classes.
69 See L<Net::OpenSocial::Client::Container::Orkut>,
70 L<Net::OpenSocial::Client::Container::MySpace>,
71 L<Net::OpenSocial::Client::Container::Google>,
72 L<Net::OpenSocial::Client::Container::FriendConnect>
73  
74 my $container = Net::OpenSocial::Client::Container::Orkut->new;
75  
76 or if you need new class for another container.
77 You should make new class extending this.
78  
79  
80 =head1 METHODS
81  
82 =head2 request_token_endpoint
83  
84 OAuth request-token endpoint
85  
86 =head2 authorize_endpoint
87  
88 OAuth authorization endpoint
89  
90 =head2 access_token_endpoint
91  
92 OAuth access-token endpoint
93  
94 =head2 rest_endpoint
95  
96 RESTful API endpoint URL of container.
97  
98 =head2 rpc_endpoint
99  
100 RPC endpoint URL of container.
101  
102 =head2 use_request_body_hash
103  
104 if container use OAuth Request Body Hash extension or not.
105 Set 0 by default.
106  
107 =head1 AUTHOR
108  
109 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
110  
111 =head1 COPYRIGHT AND LICENSE
112  
113 Copyright (C) 2009 by Lyo Kato
114  
115 This library is free software; you can redistribute it and/or modify
116 it under the same terms as Perl itself, either Perl version 5.8.8 or,
117 at your option, any later version of Perl 5 you may have available.
118  
119 =cut
120  
« Client/Collection.pm ↑ Summary Client/Formatter.pm »