osdn-client

OSDNClient - the Ruby gem for the OSDN REST API v0 beta

OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.0.20171120
  • Package version: 0.0.20171120
  • Build date: 2019-12-23T17:21:47.872+09:00
  • Build package: class io.swagger.codegen.languages.RubyClientCodegen For more information, please visit https://osdn.net/projects/osdn-codes/wiki/APIGuide

Installation

Build a gem

To build the Ruby code into a gem:

gem build osdn-client.gemspec

Then either install the gem locally:

gem install ./osdn-client-0.0.20171120.gem

(for development, run gem install --dev ./osdn-client-0.0.20171120.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'osdn-client', '~> 0.0.20171120'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/OSDN/Client, then add the following in the Gemfile:

gem 'osdn-client', :git => 'https://github.com/OSDN/Client.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'osdn-client'

# Setup authorization
OSDNClient.configure do |config|
  # Configure OAuth2 access token for authorization: oauth2-code
  config.access_token = 'YOUR ACCESS TOKEN'

  # Configure OAuth2 access token for authorization: oauth2-implicit
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = OSDNClient::DefaultApi.new

begin
  result = api_instance.ping
  p result
rescue OSDNClient::ApiError => e
  puts "Exception when calling DefaultApi->ping: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://osdn.net/api/v0

Class Method HTTP request Description
OSDNClient::DefaultApi ping GET /ping
OSDNClient::DefaultApi token POST /token
OSDNClient::ProjectApi create_news POST /news
OSDNClient::ProjectApi create_news_0 POST /project/id_or_name/news
OSDNClient::ProjectApi create_package POST /project/id_or_name/frs
OSDNClient::ProjectApi create_project_bzr POST /project/id_or_name/bzr
OSDNClient::ProjectApi create_project_git POST /project/id_or_name/git
OSDNClient::ProjectApi create_project_git_hook POST /project/id_or_name/git/repo_id/hooks
OSDNClient::ProjectApi create_project_hg POST /project/id_or_name/hg
OSDNClient::ProjectApi create_project_profile POST /project/id_or_name/admin/profile
OSDNClient::ProjectApi create_project_ticket POST /project/id_or_name/ticket
OSDNClient::ProjectApi create_project_ticket_comment POST /project/id_or_name/ticket/ticket_id/comment
OSDNClient::ProjectApi create_project_ticket_component POST /project/id_or_name/ticket/component
OSDNClient::ProjectApi create_project_ticket_milestone POST /project/id_or_name/ticket/milestone
OSDNClient::ProjectApi create_project_ticket_type POST /project/id_or_name/ticket/type
OSDNClient::ProjectApi create_project_ticket_type_instruction POST /project/id_or_name/ticket/type/type_id/instruction
OSDNClient::ProjectApi create_release POST /project/id_or_name/frs/package_id
OSDNClient::ProjectApi create_release_file POST /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectApi delete_news DELETE /news/news_id
OSDNClient::ProjectApi delete_news_0 DELETE /project/id_or_name/news/news_id
OSDNClient::ProjectApi delete_package DELETE /project/id_or_name/frs/package_id
OSDNClient::ProjectApi delete_project_admin_projectweb DELETE /project/id_or_name/admin/project_web
OSDNClient::ProjectApi delete_project_git_hook DELETE /project/id_or_name/git/repo_id/hooks/hook_id
OSDNClient::ProjectApi delete_project_profile DELETE /project/id_or_name/admin/profile/language_code
OSDNClient::ProjectApi delete_project_ticket_component DELETE /project/id_or_name/ticket/component/component_id
OSDNClient::ProjectApi delete_project_ticket_milestone DELETE /project/id_or_name/ticket/milestone/milestone_id
OSDNClient::ProjectApi delete_project_ticket_type DELETE /project/id_or_name/ticket/type/type_id
OSDNClient::ProjectApi delete_project_ticket_type_instruction DELETE /project/id_or_name/ticket/type/type_id/instruction/language_code
OSDNClient::ProjectApi delete_release DELETE /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectApi delete_release_file DELETE /project/id_or_name/frs/package_id/release_id/file_id
OSDNClient::ProjectApi disable_project_bzr DELETE /project/id_or_name/bzr/repo_id
OSDNClient::ProjectApi disable_project_git DELETE /project/id_or_name/git/repo_id
OSDNClient::ProjectApi disable_project_hg DELETE /project/id_or_name/hg/repo_id
OSDNClient::ProjectApi draft_release GET /project/id_or_name/frs/package_id/draft
OSDNClient::ProjectApi get_frs_adminprefs GET /project/id_or_name/frs/admin
OSDNClient::ProjectApi get_news GET /news/news_id
OSDNClient::ProjectApi get_news_0 GET /project/id_or_name/news/news_id
OSDNClient::ProjectApi get_package GET /project/id_or_name/frs/package_id
OSDNClient::ProjectApi get_project GET /project/id_or_name
OSDNClient::ProjectApi get_project_admin_projectweb GET /project/id_or_name/admin/project_web
OSDNClient::ProjectApi get_project_bzr GET /project/id_or_name/bzr/repo_id
OSDNClient::ProjectApi get_project_git GET /project/id_or_name/git/repo_id
OSDNClient::ProjectApi get_project_git_hook GET /project/id_or_name/git/repo_id/hooks/hook_id
OSDNClient::ProjectApi get_project_hg GET /project/id_or_name/hg/repo_id
OSDNClient::ProjectApi get_project_histories GET /project/id_or_name/history
OSDNClient::ProjectApi get_project_profile GET /project/id_or_name/admin/profile/language_code
OSDNClient::ProjectApi get_project_profile_list GET /project/id_or_name/admin/profile
OSDNClient::ProjectApi get_project_svn GET /project/id_or_name/svn
OSDNClient::ProjectApi get_project_ticket GET /project/id_or_name/ticket/ticket_id
OSDNClient::ProjectApi get_project_ticket_component GET /project/id_or_name/ticket/component/component_id
OSDNClient::ProjectApi get_project_ticket_milestone GET /project/id_or_name/ticket/milestone/milestone_id
OSDNClient::ProjectApi get_project_ticket_type GET /project/id_or_name/ticket/type/type_id
OSDNClient::ProjectApi get_project_ticket_type_instruction GET /project/id_or_name/ticket/type/type_id/instruction/language_code
OSDNClient::ProjectApi get_project_ticket_type_instruction_0 PATCH /project/id_or_name/ticket/type/type_id/instruction/language_code
OSDNClient::ProjectApi get_project_tools GET /project/id_or_name/admin/tools
OSDNClient::ProjectApi get_release GET /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectApi get_release_file GET /project/id_or_name/frs/package_id/release_id/file_id
OSDNClient::ProjectApi list_news GET /news
OSDNClient::ProjectApi list_news_0 GET /project/id_or_name/news
OSDNClient::ProjectApi list_packages GET /project/id_or_name/frs
OSDNClient::ProjectApi list_project_bzr GET /project/id_or_name/bzr
OSDNClient::ProjectApi list_project_git GET /project/id_or_name/git
OSDNClient::ProjectApi list_project_git_hook GET /project/id_or_name/git/repo_id/hooks
OSDNClient::ProjectApi list_project_hg GET /project/id_or_name/hg
OSDNClient::ProjectApi list_project_ticket GET /project/id_or_name/ticket
OSDNClient::ProjectApi list_project_ticket_comment GET /project/id_or_name/ticket/ticket_id/comment
OSDNClient::ProjectApi list_project_ticket_component GET /project/id_or_name/ticket/component
OSDNClient::ProjectApi list_project_ticket_milestone GET /project/id_or_name/ticket/milestone
OSDNClient::ProjectApi list_project_ticket_type GET /project/id_or_name/ticket/type
OSDNClient::ProjectApi list_project_ticket_type_instruction GET /project/id_or_name/ticket/type/type_id/instruction
OSDNClient::ProjectApi show_project_ticket_adminprefs GET /project/id_or_name/ticket/admin
OSDNClient::ProjectApi show_project_ticket_comment GET /project/id_or_name/ticket/ticket_id/comment/comment_id
OSDNClient::ProjectApi update_frs_adminprefs PATCH /project/id_or_name/frs/admin
OSDNClient::ProjectApi update_news PATCH /news/news_id
OSDNClient::ProjectApi update_news_0 PATCH /project/id_or_name/news/news_id
OSDNClient::ProjectApi update_package PATCH /project/id_or_name/frs/package_id
OSDNClient::ProjectApi update_project_admin_projectweb PATCH /project/id_or_name/admin/project_web
OSDNClient::ProjectApi update_project_bzr PATCH /project/id_or_name/bzr/repo_id
OSDNClient::ProjectApi update_project_git PATCH /project/id_or_name/git/repo_id
OSDNClient::ProjectApi update_project_hg PATCH /project/id_or_name/hg/repo_id
OSDNClient::ProjectApi update_project_profile PATCH /project/id_or_name/admin/profile/language_code
OSDNClient::ProjectApi update_project_ticket PATCH /project/id_or_name/ticket/ticket_id
OSDNClient::ProjectApi update_project_ticket_adminprefs PATCH /project/id_or_name/ticket/admin
OSDNClient::ProjectApi update_project_ticket_component PATCH /project/id_or_name/ticket/component/component_id
OSDNClient::ProjectApi update_project_ticket_milestone PATCH /project/id_or_name/ticket/milestone/milestone_id
OSDNClient::ProjectApi update_project_ticket_type PATCH /project/id_or_name/ticket/type/type_id
OSDNClient::ProjectApi update_project_tools PATCH /project/id_or_name/admin/tools
OSDNClient::ProjectApi update_release PATCH /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectApi update_release_file PATCH /project/id_or_name/frs/package_id/release_id/file_id
OSDNClient::ProjectFrsApi create_package POST /project/id_or_name/frs
OSDNClient::ProjectFrsApi create_release POST /project/id_or_name/frs/package_id
OSDNClient::ProjectFrsApi create_release_file POST /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectFrsApi delete_package DELETE /project/id_or_name/frs/package_id
OSDNClient::ProjectFrsApi delete_release DELETE /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectFrsApi delete_release_file DELETE /project/id_or_name/frs/package_id/release_id/file_id
OSDNClient::ProjectFrsApi draft_release GET /project/id_or_name/frs/package_id/draft
OSDNClient::ProjectFrsApi get_frs_adminprefs GET /project/id_or_name/frs/admin
OSDNClient::ProjectFrsApi get_package GET /project/id_or_name/frs/package_id
OSDNClient::ProjectFrsApi get_release GET /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectFrsApi get_release_file GET /project/id_or_name/frs/package_id/release_id/file_id
OSDNClient::ProjectFrsApi list_packages GET /project/id_or_name/frs
OSDNClient::ProjectFrsApi update_frs_adminprefs PATCH /project/id_or_name/frs/admin
OSDNClient::ProjectFrsApi update_package PATCH /project/id_or_name/frs/package_id
OSDNClient::ProjectFrsApi update_release PATCH /project/id_or_name/frs/package_id/release_id
OSDNClient::ProjectFrsApi update_release_file PATCH /project/id_or_name/frs/package_id/release_id/file_id
OSDNClient::ProjectNewsApi create_news POST /news
OSDNClient::ProjectNewsApi create_news_0 POST /project/id_or_name/news
OSDNClient::ProjectNewsApi delete_news DELETE /news/news_id
OSDNClient::ProjectNewsApi delete_news_0 DELETE /project/id_or_name/news/news_id
OSDNClient::ProjectNewsApi get_news GET /news/news_id
OSDNClient::ProjectNewsApi get_news_0 GET /project/id_or_name/news/news_id
OSDNClient::ProjectNewsApi list_news GET /news
OSDNClient::ProjectNewsApi list_news_0 GET /project/id_or_name/news
OSDNClient::ProjectNewsApi update_news PATCH /news/news_id
OSDNClient::ProjectNewsApi update_news_0 PATCH /project/id_or_name/news/news_id
OSDNClient::ProjectSCMApi create_project_bzr POST /project/id_or_name/bzr
OSDNClient::ProjectSCMApi create_project_git POST /project/id_or_name/git
OSDNClient::ProjectSCMApi create_project_git_hook POST /project/id_or_name/git/repo_id/hooks
OSDNClient::ProjectSCMApi create_project_hg POST /project/id_or_name/hg
OSDNClient::ProjectSCMApi delete_project_git_hook DELETE /project/id_or_name/git/repo_id/hooks/hook_id
OSDNClient::ProjectSCMApi disable_project_bzr DELETE /project/id_or_name/bzr/repo_id
OSDNClient::ProjectSCMApi disable_project_git DELETE /project/id_or_name/git/repo_id
OSDNClient::ProjectSCMApi disable_project_hg DELETE /project/id_or_name/hg/repo_id
OSDNClient::ProjectSCMApi get_project_bzr GET /project/id_or_name/bzr/repo_id
OSDNClient::ProjectSCMApi get_project_git GET /project/id_or_name/git/repo_id
OSDNClient::ProjectSCMApi get_project_git_hook GET /project/id_or_name/git/repo_id/hooks/hook_id
OSDNClient::ProjectSCMApi get_project_hg GET /project/id_or_name/hg/repo_id
OSDNClient::ProjectSCMApi get_project_svn GET /project/id_or_name/svn
OSDNClient::ProjectSCMApi list_project_bzr GET /project/id_or_name/bzr
OSDNClient::ProjectSCMApi list_project_git GET /project/id_or_name/git
OSDNClient::ProjectSCMApi list_project_git_hook GET /project/id_or_name/git/repo_id/hooks
OSDNClient::ProjectSCMApi list_project_hg GET /project/id_or_name/hg
OSDNClient::ProjectSCMApi update_project_bzr PATCH /project/id_or_name/bzr/repo_id
OSDNClient::ProjectSCMApi update_project_git PATCH /project/id_or_name/git/repo_id
OSDNClient::ProjectSCMApi update_project_hg PATCH /project/id_or_name/hg/repo_id
OSDNClient::ProjectTicketApi create_project_ticket POST /project/id_or_name/ticket
OSDNClient::ProjectTicketApi create_project_ticket_comment POST /project/id_or_name/ticket/ticket_id/comment
OSDNClient::ProjectTicketApi create_project_ticket_component POST /project/id_or_name/ticket/component
OSDNClient::ProjectTicketApi create_project_ticket_milestone POST /project/id_or_name/ticket/milestone
OSDNClient::ProjectTicketApi create_project_ticket_type POST /project/id_or_name/ticket/type
OSDNClient::ProjectTicketApi create_project_ticket_type_instruction POST /project/id_or_name/ticket/type/type_id/instruction
OSDNClient::ProjectTicketApi delete_project_ticket_component DELETE /project/id_or_name/ticket/component/component_id
OSDNClient::ProjectTicketApi delete_project_ticket_milestone DELETE /project/id_or_name/ticket/milestone/milestone_id
OSDNClient::ProjectTicketApi delete_project_ticket_type DELETE /project/id_or_name/ticket/type/type_id
OSDNClient::ProjectTicketApi delete_project_ticket_type_instruction DELETE /project/id_or_name/ticket/type/type_id/instruction/language_code
OSDNClient::ProjectTicketApi get_project_ticket GET /project/id_or_name/ticket/ticket_id
OSDNClient::ProjectTicketApi get_project_ticket_component GET /project/id_or_name/ticket/component/component_id
OSDNClient::ProjectTicketApi get_project_ticket_milestone GET /project/id_or_name/ticket/milestone/milestone_id
OSDNClient::ProjectTicketApi get_project_ticket_type GET /project/id_or_name/ticket/type/type_id
OSDNClient::ProjectTicketApi get_project_ticket_type_instruction GET /project/id_or_name/ticket/type/type_id/instruction/language_code
OSDNClient::ProjectTicketApi get_project_ticket_type_instruction_0 PATCH /project/id_or_name/ticket/type/type_id/instruction/language_code
OSDNClient::ProjectTicketApi list_project_ticket GET /project/id_or_name/ticket
OSDNClient::ProjectTicketApi list_project_ticket_comment GET /project/id_or_name/ticket/ticket_id/comment
OSDNClient::ProjectTicketApi list_project_ticket_component GET /project/id_or_name/ticket/component
OSDNClient::ProjectTicketApi list_project_ticket_milestone GET /project/id_or_name/ticket/milestone
OSDNClient::ProjectTicketApi list_project_ticket_type GET /project/id_or_name/ticket/type
OSDNClient::ProjectTicketApi list_project_ticket_type_instruction GET /project/id_or_name/ticket/type/type_id/instruction
OSDNClient::ProjectTicketApi show_project_ticket_adminprefs GET /project/id_or_name/ticket/admin
OSDNClient::ProjectTicketApi show_project_ticket_comment GET /project/id_or_name/ticket/ticket_id/comment/comment_id
OSDNClient::ProjectTicketApi update_project_ticket PATCH /project/id_or_name/ticket/ticket_id
OSDNClient::ProjectTicketApi update_project_ticket_adminprefs PATCH /project/id_or_name/ticket/admin
OSDNClient::ProjectTicketApi update_project_ticket_component PATCH /project/id_or_name/ticket/component/component_id
OSDNClient::ProjectTicketApi update_project_ticket_milestone PATCH /project/id_or_name/ticket/milestone/milestone_id
OSDNClient::ProjectTicketApi update_project_ticket_type PATCH /project/id_or_name/ticket/type/type_id
OSDNClient::UserApi get_user GET /user/id_or_name
OSDNClient::UserApi get_user_history GET /user/id_or_name/history
OSDNClient::UserApi get_user_stats_daily GET /user/id_or_name/stats/daily
OSDNClient::UserApi get_user_stats_monthly GET /user/id_or_name/stats/monthly
OSDNClient::UserApi update_user_icon POST /user/id_or_name/icon
OSDNClient::UserApi update_user_photo POST /user/id_or_name/photo

Documentation for Models

Documentation for Authorization

oauth2-code

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://osdn.net/account/oauth2ui/authorize
  • Scopes:
    • profile: Read basic user profile
    • profile_write: Write basic user profile
    • group: read access to group data
    • group_write: write access to group data
    • chamber: read access to chamber data
    • chamber_write: write access to chamber data

oauth2-implicit

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://osdn.net/account/oauth2ui/authorize
  • Scopes:
    • profile: Read basic user profile
    • profile_write: Write basic user profile
    • group: read access to group data
    • group_write: write access to group data
    • chamber: read access to chamber data
    • chamber_write: write access to chamber data