forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_data.rb
More file actions
40 lines (32 loc) · 1.14 KB
/
git_data.rb
File metadata and controls
40 lines (32 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# encoding: utf-8
module Github
class GitData < API
extend AutoloadHelper
autoload_all 'github_api/git_data',
:Blobs => 'blobs',
:Commits => 'commits',
:References => 'references',
:Tags => 'tags',
:Trees => 'trees'
# Access to GitData::Blobs API
def blobs(options={}, &block)
@blobs ||= ApiFactory.new('GitData::Blobs', current_options.merge(options), &block)
end
# Access to GitData::Commits API
def commits(options={}, &block)
@commits ||= ApiFactory.new('GitData::Commits', current_options.merge(options), &block)
end
# Access to GitData::References API
def references(options={}, &block)
@references ||= ApiFactory.new('GitData::References', current_options.merge(options), &block)
end
# Access to GitData::Tags API
def tags(options={}, &block)
@tags ||= ApiFactory.new('GitData::Tags', current_options.merge(options), &block)
end
# Access to GitData::Tags API
def trees(options={}, &block)
@trees ||= ApiFactory.new('GitData::Trees', current_options.merge(options), &block)
end
end # GitData
end # Github