Skip to content

Commit e268a41

Browse files
committed
Add example on how to create download resource.
1 parent 4face50 commit e268a41

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/github_api/repos/downloads.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ def create(user_name, repo_name, params={})
100100
# * <tt>resource</tt> - Required resource of the create_download call.
101101
# * <tt>:filename</tt> - Required filename, a path to a file location.
102102
#
103+
# = Examples
104+
# resource = github.repos.downloads.create 'user-name', 'repo-name'
105+
#
106+
# github.repos.downloads.upload resource, '/users/octokit/image.jpg'
107+
#
103108
def upload(resource, filename)
104109
_validate_presence_of resource, filename
105110

0 commit comments

Comments
 (0)