osdn-client 0.0.20160304 → 0.0.20160711
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +201 -0
- data/README.md +182 -0
- data/docs/DefaultApi.md +115 -0
- data/docs/Group.md +23 -0
- data/docs/GroupToolFlags.md +17 -0
- data/docs/News.md +14 -0
- data/docs/Package.md +13 -0
- data/docs/Pong.md +11 -0
- data/docs/ProjectApi.md +1511 -0
- data/docs/ProjectFrsApi.md +888 -0
- data/docs/ProjectNewsApi.md +576 -0
- data/docs/RelFile.md +19 -0
- data/docs/Release.md +16 -0
- data/docs/SimpleChamber.md +11 -0
- data/docs/SimpleGroup.md +11 -0
- data/docs/SimpleUser.md +10 -0
- data/docs/Skill.md +11 -0
- data/docs/Token.md +12 -0
- data/docs/User.md +20 -0
- data/docs/UserApi.md +63 -0
- data/lib/osdn-client.rb +32 -9
- data/lib/osdn-client/api/default_api.rb +50 -39
- data/lib/osdn-client/api/project_api.rb +661 -773
- data/lib/osdn-client/api/project_frs_api.rb +350 -412
- data/lib/osdn-client/api/project_news_api.rb +217 -244
- data/lib/osdn-client/api/user_api.rb +35 -20
- data/lib/osdn-client/api_client.rb +74 -13
- data/lib/osdn-client/api_error.rb +23 -0
- data/lib/osdn-client/configuration.rb +45 -1
- data/lib/osdn-client/models/group.rb +103 -65
- data/lib/osdn-client/models/group_tool_flags.rb +91 -47
- data/lib/osdn-client/models/news.rb +85 -38
- data/lib/osdn-client/models/package.rb +83 -35
- data/lib/osdn-client/models/pong.rb +79 -29
- data/lib/osdn-client/models/rel_file.rb +95 -53
- data/lib/osdn-client/models/release.rb +89 -44
- data/lib/osdn-client/models/simple_chamber.rb +79 -29
- data/lib/osdn-client/models/simple_group.rb +79 -29
- data/lib/osdn-client/models/simple_user.rb +77 -26
- data/lib/osdn-client/models/skill.rb +79 -29
- data/lib/osdn-client/models/token.rb +81 -32
- data/lib/osdn-client/models/user.rb +97 -56
- data/lib/osdn-client/version.rb +24 -1
- data/osdn-client.gemspec +30 -7
- data/spec/api/default_api_spec.rb +73 -0
- data/spec/api/{ProjectApi_spec.rb → project_api_spec.rb} +187 -264
- data/spec/api/{ProjectFrsApi_spec.rb → project_frs_api_spec.rb} +103 -136
- data/spec/api/{ProjectNewsApi_spec.rb → project_news_api_spec.rb} +71 -88
- data/spec/api/user_api_spec.rb +58 -0
- data/spec/api_client_spec.rb +315 -0
- data/spec/configuration_spec.rb +48 -0
- data/spec/models/group_spec.rb +143 -0
- data/spec/models/group_tool_flags_spec.rb +107 -0
- data/spec/models/news_spec.rb +89 -0
- data/spec/models/package_spec.rb +83 -0
- data/spec/models/pong_spec.rb +71 -0
- data/spec/models/rel_file_spec.rb +119 -0
- data/spec/models/release_spec.rb +101 -0
- data/spec/models/simple_chamber_spec.rb +71 -0
- data/spec/models/simple_group_spec.rb +71 -0
- data/spec/models/simple_user_spec.rb +65 -0
- data/spec/models/skill_spec.rb +71 -0
- data/spec/models/token_spec.rb +77 -0
- data/spec/models/user_spec.rb +125 -0
- data/spec/spec_helper.rb +122 -0
- metadata +87 -59
- data/spec/api/DefaultApi_spec.rb +0 -58
- data/spec/api/UserApi_spec.rb +0 -39
- data/spec/models/GroupToolFlags_spec.rb +0 -124
- data/spec/models/Group_spec.rb +0 -184
- data/spec/models/News_spec.rb +0 -94
- data/spec/models/Package_spec.rb +0 -84
- data/spec/models/Pong_spec.rb +0 -64
- data/spec/models/RelFile_spec.rb +0 -144
- data/spec/models/Release_spec.rb +0 -114
- data/spec/models/SimpleChamber_spec.rb +0 -64
- data/spec/models/SimpleGroup_spec.rb +0 -64
- data/spec/models/SimpleUser_spec.rb +0 -54
- data/spec/models/Skill_spec.rb +0 -64
- data/spec/models/Token_spec.rb +0 -74
- data/spec/models/User_spec.rb +0 -154
data/docs/RelFile.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# OSDNClient::RelFile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**date** | **DateTime** | | [optional]
|
9
|
+
**url** | **String** | | [optional]
|
10
|
+
**visibility** | **String** | | [optional]
|
11
|
+
**cascaded_visibility** | **String** | | [optional]
|
12
|
+
**release_id** | **Integer** | | [optional]
|
13
|
+
**size** | **Integer** | | [optional]
|
14
|
+
**digest_md5** | **String** | | [optional]
|
15
|
+
**digest_sha1** | **String** | | [optional]
|
16
|
+
**digest_sha256** | **String** | | [optional]
|
17
|
+
**download_count** | **Integer** | | [optional]
|
18
|
+
|
19
|
+
|
data/docs/Release.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# OSDNClient::Release
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**url** | **String** | | [optional]
|
9
|
+
**visibility** | **String** | | [optional]
|
10
|
+
**cascaded_visibility** | **String** | | [optional]
|
11
|
+
**package_id** | **Integer** | | [optional]
|
12
|
+
**file_count** | **Integer** | | [optional]
|
13
|
+
**is_draft** | **BOOLEAN** | | [optional]
|
14
|
+
**files** | [**Array<RelFile>**](RelFile.md) | | [optional]
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# OSDNClient::SimpleChamber
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**display_name** | **String** | | [optional]
|
9
|
+
**last_update** | **DateTime** | | [optional]
|
10
|
+
|
11
|
+
|
data/docs/SimpleGroup.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# OSDNClient::SimpleGroup
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**display_name** | **String** | | [optional]
|
9
|
+
**last_update** | **DateTime** | | [optional]
|
10
|
+
|
11
|
+
|
data/docs/SimpleUser.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# OSDNClient::SimpleUser
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**display_name** | **String** | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/Skill.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# OSDNClient::Skill
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**name** | **String** | | [optional]
|
7
|
+
**level** | **Integer** | | [optional]
|
8
|
+
**experience** | **String** | | [optional]
|
9
|
+
**hate_like** | **Integer** | | [optional]
|
10
|
+
|
11
|
+
|
data/docs/Token.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# OSDNClient::Token
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**access_token** | **String** | | [optional]
|
7
|
+
**expires_in** | **Integer** | | [optional]
|
8
|
+
**token_type** | **String** | | [optional]
|
9
|
+
**scope** | **String** | | [optional]
|
10
|
+
**refresh_token** | **String** | | [optional]
|
11
|
+
|
12
|
+
|
data/docs/User.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# OSDNClient::User
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**display_name** | **String** | | [optional]
|
9
|
+
**unix_status** | **BOOLEAN** | | [optional]
|
10
|
+
**unix_uid** | **Integer** | | [optional]
|
11
|
+
**authorized_keys** | **String** | | [optional]
|
12
|
+
**timezone** | **String** | | [optional]
|
13
|
+
**last_update** | **DateTime** | | [optional]
|
14
|
+
**add_date** | **DateTime** | | [optional]
|
15
|
+
**language** | **String** | | [optional]
|
16
|
+
**groups** | [**Array<SimpleGroup>**](SimpleGroup.md) | | [optional]
|
17
|
+
**chambers** | [**Array<SimpleChamber>**](SimpleChamber.md) | | [optional]
|
18
|
+
**skills** | [**Array<Skill>**](Skill.md) | | [optional]
|
19
|
+
|
20
|
+
|
data/docs/UserApi.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# OSDNClient::UserApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://osdn.jp/api/v0*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_user**](UserApi.md#get_user) | **GET** /user/{id_or_name} |
|
8
|
+
|
9
|
+
|
10
|
+
# **get_user**
|
11
|
+
> User get_user(id_or_name)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
Get user profile.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'osdn-client'
|
21
|
+
# setup authorization
|
22
|
+
OSDNClient.configure do |config|
|
23
|
+
# Configure OAuth2 access token for authorization: oauth2-code
|
24
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
25
|
+
|
26
|
+
# Configure OAuth2 access token for authorization: oauth2-implicit
|
27
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
api_instance = OSDNClient::UserApi.new
|
31
|
+
|
32
|
+
id_or_name = "id_or_name_example" # String | numeric user id or user name
|
33
|
+
|
34
|
+
|
35
|
+
begin
|
36
|
+
result = api_instance.get_user(id_or_name)
|
37
|
+
p result
|
38
|
+
rescue OSDNClient::ApiError => e
|
39
|
+
puts "Exception when calling UserApi->get_user: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**id_or_name** | **String**| numeric user id or user name |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
[**User**](User.md)
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[oauth2-code](../README.md#oauth2-code), [oauth2-implicit](../README.md#oauth2-implicit)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
60
|
+
- **Accept**: Not defined
|
61
|
+
|
62
|
+
|
63
|
+
|
data/lib/osdn-client.rb
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20160304
|
7
|
+
Contact: admin@osdn.jp
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
1
24
|
# Common files
|
2
25
|
require 'osdn-client/api_client'
|
3
26
|
require 'osdn-client/api_error'
|
@@ -5,26 +28,26 @@ require 'osdn-client/version'
|
|
5
28
|
require 'osdn-client/configuration'
|
6
29
|
|
7
30
|
# Models
|
8
|
-
require 'osdn-client/models/simple_user'
|
9
|
-
require 'osdn-client/models/user'
|
10
|
-
require 'osdn-client/models/simple_group'
|
11
31
|
require 'osdn-client/models/group'
|
12
32
|
require 'osdn-client/models/group_tool_flags'
|
13
|
-
require 'osdn-client/models/simple_chamber'
|
14
|
-
require 'osdn-client/models/skill'
|
15
33
|
require 'osdn-client/models/news'
|
16
34
|
require 'osdn-client/models/package'
|
17
|
-
require 'osdn-client/models/
|
35
|
+
require 'osdn-client/models/pong'
|
18
36
|
require 'osdn-client/models/rel_file'
|
37
|
+
require 'osdn-client/models/release'
|
38
|
+
require 'osdn-client/models/simple_chamber'
|
39
|
+
require 'osdn-client/models/simple_group'
|
40
|
+
require 'osdn-client/models/simple_user'
|
41
|
+
require 'osdn-client/models/skill'
|
19
42
|
require 'osdn-client/models/token'
|
20
|
-
require 'osdn-client/models/
|
43
|
+
require 'osdn-client/models/user'
|
21
44
|
|
22
45
|
# APIs
|
46
|
+
require 'osdn-client/api/default_api'
|
23
47
|
require 'osdn-client/api/project_api'
|
24
|
-
require 'osdn-client/api/user_api'
|
25
48
|
require 'osdn-client/api/project_frs_api'
|
26
49
|
require 'osdn-client/api/project_news_api'
|
27
|
-
require 'osdn-client/api/
|
50
|
+
require 'osdn-client/api/user_api'
|
28
51
|
|
29
52
|
module OSDNClient
|
30
53
|
class << self
|
@@ -1,3 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20160304
|
7
|
+
Contact: admin@osdn.jp
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
1
24
|
require "uri"
|
2
25
|
|
3
26
|
module OSDNClient
|
@@ -9,25 +32,24 @@ module OSDNClient
|
|
9
32
|
end
|
10
33
|
|
11
34
|
#
|
12
|
-
# return pong for test
|
35
|
+
# return pong for test
|
13
36
|
# @param [Hash] opts the optional parameters
|
14
37
|
# @return [Pong]
|
15
38
|
def ping(opts = {})
|
16
|
-
data,
|
39
|
+
data, _status_code, _headers = ping_with_http_info(opts)
|
17
40
|
return data
|
18
41
|
end
|
19
42
|
|
20
43
|
#
|
21
|
-
# return pong for test
|
44
|
+
# return pong for test
|
22
45
|
# @param [Hash] opts the optional parameters
|
23
46
|
# @return [Array<(Pong, Fixnum, Hash)>] Pong data, response status code and response headers
|
24
47
|
def ping_with_http_info(opts = {})
|
25
48
|
if @api_client.config.debugging
|
26
|
-
@api_client.config.logger.debug "Calling API: DefaultApi
|
49
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.ping ..."
|
27
50
|
end
|
28
|
-
|
29
51
|
# resource path
|
30
|
-
|
52
|
+
local_var_path = "/ping".sub('{format}','json')
|
31
53
|
|
32
54
|
# query parameters
|
33
55
|
query_params = {}
|
@@ -36,22 +58,20 @@ module OSDNClient
|
|
36
58
|
header_params = {}
|
37
59
|
|
38
60
|
# HTTP header 'Accept' (if needed)
|
39
|
-
|
40
|
-
|
61
|
+
local_header_accept = []
|
62
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
41
63
|
|
42
64
|
# HTTP header 'Content-Type'
|
43
|
-
|
44
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
65
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
66
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
45
67
|
|
46
68
|
# form parameters
|
47
69
|
form_params = {}
|
48
70
|
|
49
71
|
# http body (model)
|
50
72
|
post_body = nil
|
51
|
-
|
52
|
-
|
53
|
-
auth_names = ['oauth2-implicit']
|
54
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
73
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
74
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
55
75
|
:header_params => header_params,
|
56
76
|
:query_params => query_params,
|
57
77
|
:form_params => form_params,
|
@@ -69,12 +89,12 @@ module OSDNClient
|
|
69
89
|
# @param client_id Your application ID
|
70
90
|
# @param client_secret Your application secret (key)
|
71
91
|
# @param [Hash] opts the optional parameters
|
72
|
-
# @option opts [String] :grant_type \"authorization_code\" or \"refresh_token\"
|
73
|
-
# @option opts [String] :code Set auth code issued by https://osdn.jp/account/oauth2ui/authorize for grant_type
|
92
|
+
# @option opts [String] :grant_type \"authorization_code\" or \"refresh_token\" (default to authorization_code)
|
93
|
+
# @option opts [String] :code Set auth code issued by https://osdn.jp/account/oauth2ui/authorize for grant_type=authorization_code
|
74
94
|
# @option opts [String] :refresh_token Set refresh token to update access token.
|
75
95
|
# @return [Token]
|
76
96
|
def token(client_id, client_secret, opts = {})
|
77
|
-
data,
|
97
|
+
data, _status_code, _headers = token_with_http_info(client_id, client_secret, opts)
|
78
98
|
return data
|
79
99
|
end
|
80
100
|
|
@@ -84,22 +104,19 @@ module OSDNClient
|
|
84
104
|
# @param client_secret Your application secret (key)
|
85
105
|
# @param [Hash] opts the optional parameters
|
86
106
|
# @option opts [String] :grant_type \"authorization_code\" or \"refresh_token\"
|
87
|
-
# @option opts [String] :code Set auth code issued by https://osdn.jp/account/oauth2ui/authorize for grant_type
|
107
|
+
# @option opts [String] :code Set auth code issued by https://osdn.jp/account/oauth2ui/authorize for grant_type=authorization_code
|
88
108
|
# @option opts [String] :refresh_token Set refresh token to update access token.
|
89
109
|
# @return [Array<(Token, Fixnum, Hash)>] Token data, response status code and response headers
|
90
110
|
def token_with_http_info(client_id, client_secret, opts = {})
|
91
111
|
if @api_client.config.debugging
|
92
|
-
@api_client.config.logger.debug "Calling API: DefaultApi
|
112
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.token ..."
|
93
113
|
end
|
94
|
-
|
95
114
|
# verify the required parameter 'client_id' is set
|
96
|
-
fail "Missing the required parameter 'client_id' when calling token" if client_id.nil?
|
97
|
-
|
115
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling DefaultApi.token" if client_id.nil?
|
98
116
|
# verify the required parameter 'client_secret' is set
|
99
|
-
fail "Missing the required parameter 'client_secret' when calling token" if client_secret.nil?
|
100
|
-
|
117
|
+
fail ArgumentError, "Missing the required parameter 'client_secret' when calling DefaultApi.token" if client_secret.nil?
|
101
118
|
# resource path
|
102
|
-
|
119
|
+
local_var_path = "/token".sub('{format}','json')
|
103
120
|
|
104
121
|
# query parameters
|
105
122
|
query_params = {}
|
@@ -108,27 +125,25 @@ module OSDNClient
|
|
108
125
|
header_params = {}
|
109
126
|
|
110
127
|
# HTTP header 'Accept' (if needed)
|
111
|
-
|
112
|
-
|
128
|
+
local_header_accept = []
|
129
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
113
130
|
|
114
131
|
# HTTP header 'Content-Type'
|
115
|
-
|
116
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
132
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
133
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
117
134
|
|
118
135
|
# form parameters
|
119
136
|
form_params = {}
|
120
137
|
form_params["client_id"] = client_id
|
121
138
|
form_params["client_secret"] = client_secret
|
122
|
-
form_params["grant_type"] = opts[:'grant_type'] if opts[:'grant_type']
|
123
|
-
form_params["code"] = opts[:'code'] if opts[:'code']
|
124
|
-
form_params["refresh_token"] = opts[:'refresh_token'] if opts[:'refresh_token']
|
139
|
+
form_params["grant_type"] = opts[:'grant_type'] if !opts[:'grant_type'].nil?
|
140
|
+
form_params["code"] = opts[:'code'] if !opts[:'code'].nil?
|
141
|
+
form_params["refresh_token"] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
|
125
142
|
|
126
143
|
# http body (model)
|
127
144
|
post_body = nil
|
128
|
-
|
129
|
-
|
130
145
|
auth_names = []
|
131
|
-
data, status_code, headers = @api_client.call_api(:POST,
|
146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
132
147
|
:header_params => header_params,
|
133
148
|
:query_params => query_params,
|
134
149
|
:form_params => form_params,
|
@@ -142,7 +157,3 @@ module OSDNClient
|
|
142
157
|
end
|
143
158
|
end
|
144
159
|
end
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
@@ -1,3 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20160304
|
7
|
+
Contact: admin@osdn.jp
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
1
24
|
require "uri"
|
2
25
|
|
3
26
|
module OSDNClient
|
@@ -10,113 +33,117 @@ module OSDNClient
|
|
10
33
|
|
11
34
|
#
|
12
35
|
#
|
36
|
+
# @param title news title
|
37
|
+
# @param body news body in OSDN Wiki format.
|
38
|
+
# @param group_id group_id the news created in
|
13
39
|
# @param [Hash] opts the optional parameters
|
14
|
-
# @
|
15
|
-
|
16
|
-
|
17
|
-
data, status_code, headers = list_news_with_http_info(opts)
|
40
|
+
# @return [String]
|
41
|
+
def create_news(title, body, group_id, opts = {})
|
42
|
+
data, _status_code, _headers = create_news_with_http_info(title, body, group_id, opts)
|
18
43
|
return data
|
19
44
|
end
|
20
45
|
|
21
46
|
#
|
22
47
|
#
|
48
|
+
# @param title news title
|
49
|
+
# @param body news body in OSDN Wiki format.
|
50
|
+
# @param group_id group_id the news created in
|
23
51
|
# @param [Hash] opts the optional parameters
|
24
|
-
# @
|
25
|
-
|
26
|
-
def list_news_with_http_info(opts = {})
|
52
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
53
|
+
def create_news_with_http_info(title, body, group_id, opts = {})
|
27
54
|
if @api_client.config.debugging
|
28
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
55
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.create_news ..."
|
29
56
|
end
|
30
|
-
|
57
|
+
# verify the required parameter 'title' is set
|
58
|
+
fail ArgumentError, "Missing the required parameter 'title' when calling ProjectApi.create_news" if title.nil?
|
59
|
+
# verify the required parameter 'body' is set
|
60
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ProjectApi.create_news" if body.nil?
|
61
|
+
# verify the required parameter 'group_id' is set
|
62
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling ProjectApi.create_news" if group_id.nil?
|
31
63
|
# resource path
|
32
|
-
|
64
|
+
local_var_path = "/news".sub('{format}','json')
|
33
65
|
|
34
66
|
# query parameters
|
35
67
|
query_params = {}
|
36
|
-
query_params[:'group_id'] =
|
68
|
+
query_params[:'group_id'] = group_id
|
37
69
|
|
38
70
|
# header parameters
|
39
71
|
header_params = {}
|
40
72
|
|
41
73
|
# HTTP header 'Accept' (if needed)
|
42
|
-
|
43
|
-
|
74
|
+
local_header_accept = []
|
75
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
44
76
|
|
45
77
|
# HTTP header 'Content-Type'
|
46
|
-
|
47
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
78
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
79
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
48
80
|
|
49
81
|
# form parameters
|
50
82
|
form_params = {}
|
83
|
+
form_params["title"] = title
|
84
|
+
form_params["body"] = body
|
51
85
|
|
52
86
|
# http body (model)
|
53
87
|
post_body = nil
|
54
|
-
|
55
|
-
|
56
|
-
auth_names = ['oauth2-implicit']
|
57
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
88
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
58
90
|
:header_params => header_params,
|
59
91
|
:query_params => query_params,
|
60
92
|
:form_params => form_params,
|
61
93
|
:body => post_body,
|
62
94
|
:auth_names => auth_names,
|
63
|
-
:return_type => '
|
95
|
+
:return_type => 'String')
|
64
96
|
if @api_client.config.debugging
|
65
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
97
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
66
98
|
end
|
67
99
|
return data, status_code, headers
|
68
100
|
end
|
69
101
|
|
70
102
|
#
|
71
103
|
#
|
104
|
+
# @param id_or_name numeric project id or project name
|
72
105
|
# @param title news title
|
73
106
|
# @param body news body in OSDN Wiki format.
|
74
|
-
# @param group_id group_id the news created in
|
75
107
|
# @param [Hash] opts the optional parameters
|
76
108
|
# @return [String]
|
77
|
-
def
|
78
|
-
data,
|
109
|
+
def create_news_0(id_or_name, title, body, opts = {})
|
110
|
+
data, _status_code, _headers = create_news_0_with_http_info(id_or_name, title, body, opts)
|
79
111
|
return data
|
80
112
|
end
|
81
113
|
|
82
114
|
#
|
83
115
|
#
|
116
|
+
# @param id_or_name numeric project id or project name
|
84
117
|
# @param title news title
|
85
118
|
# @param body news body in OSDN Wiki format.
|
86
|
-
# @param group_id group_id the news created in
|
87
119
|
# @param [Hash] opts the optional parameters
|
88
120
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
89
|
-
def
|
121
|
+
def create_news_0_with_http_info(id_or_name, title, body, opts = {})
|
90
122
|
if @api_client.config.debugging
|
91
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
123
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.create_news_0 ..."
|
92
124
|
end
|
93
|
-
|
125
|
+
# verify the required parameter 'id_or_name' is set
|
126
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.create_news_0" if id_or_name.nil?
|
94
127
|
# verify the required parameter 'title' is set
|
95
|
-
fail "Missing the required parameter 'title' when calling
|
96
|
-
|
128
|
+
fail ArgumentError, "Missing the required parameter 'title' when calling ProjectApi.create_news_0" if title.nil?
|
97
129
|
# verify the required parameter 'body' is set
|
98
|
-
fail "Missing the required parameter 'body' when calling
|
99
|
-
|
100
|
-
# verify the required parameter 'group_id' is set
|
101
|
-
fail "Missing the required parameter 'group_id' when calling create_news" if group_id.nil?
|
102
|
-
|
130
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ProjectApi.create_news_0" if body.nil?
|
103
131
|
# resource path
|
104
|
-
|
132
|
+
local_var_path = "/project/{id_or_name}/news".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
105
133
|
|
106
134
|
# query parameters
|
107
135
|
query_params = {}
|
108
|
-
query_params[:'group_id'] = group_id
|
109
136
|
|
110
137
|
# header parameters
|
111
138
|
header_params = {}
|
112
139
|
|
113
140
|
# HTTP header 'Accept' (if needed)
|
114
|
-
|
115
|
-
|
141
|
+
local_header_accept = []
|
142
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
116
143
|
|
117
144
|
# HTTP header 'Content-Type'
|
118
|
-
|
119
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
145
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
146
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
120
147
|
|
121
148
|
# form parameters
|
122
149
|
form_params = {}
|
@@ -125,10 +152,8 @@ module OSDNClient
|
|
125
152
|
|
126
153
|
# http body (model)
|
127
154
|
post_body = nil
|
128
|
-
|
129
|
-
|
130
|
-
auth_names = ['oauth2-implicit']
|
131
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
155
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
156
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
132
157
|
:header_params => header_params,
|
133
158
|
:query_params => query_params,
|
134
159
|
:form_params => form_params,
|
@@ -136,36 +161,40 @@ module OSDNClient
|
|
136
161
|
:auth_names => auth_names,
|
137
162
|
:return_type => 'String')
|
138
163
|
if @api_client.config.debugging
|
139
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
164
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
165
|
end
|
141
166
|
return data, status_code, headers
|
142
167
|
end
|
143
168
|
|
144
169
|
#
|
145
|
-
#
|
146
|
-
# @param
|
170
|
+
# Create a package.
|
171
|
+
# @param id_or_name numeric project id or project name
|
172
|
+
# @param name package name
|
147
173
|
# @param [Hash] opts the optional parameters
|
148
|
-
# @
|
149
|
-
|
150
|
-
|
174
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
175
|
+
# @return [Package]
|
176
|
+
def create_package(id_or_name, name, opts = {})
|
177
|
+
data, _status_code, _headers = create_package_with_http_info(id_or_name, name, opts)
|
151
178
|
return data
|
152
179
|
end
|
153
180
|
|
154
181
|
#
|
155
|
-
#
|
156
|
-
# @param
|
182
|
+
# Create a package.
|
183
|
+
# @param id_or_name numeric project id or project name
|
184
|
+
# @param name package name
|
157
185
|
# @param [Hash] opts the optional parameters
|
158
|
-
# @
|
159
|
-
|
186
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
187
|
+
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
188
|
+
def create_package_with_http_info(id_or_name, name, opts = {})
|
160
189
|
if @api_client.config.debugging
|
161
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
190
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.create_package ..."
|
162
191
|
end
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
192
|
+
# verify the required parameter 'id_or_name' is set
|
193
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.create_package" if id_or_name.nil?
|
194
|
+
# verify the required parameter 'name' is set
|
195
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ProjectApi.create_package" if name.nil?
|
167
196
|
# resource path
|
168
|
-
|
197
|
+
local_var_path = "/project/{id_or_name}/frs".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
169
198
|
|
170
199
|
# query parameters
|
171
200
|
query_params = {}
|
@@ -174,59 +203,73 @@ module OSDNClient
|
|
174
203
|
header_params = {}
|
175
204
|
|
176
205
|
# HTTP header 'Accept' (if needed)
|
177
|
-
|
178
|
-
|
206
|
+
local_header_accept = []
|
207
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
179
208
|
|
180
209
|
# HTTP header 'Content-Type'
|
181
|
-
|
182
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
210
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
211
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
183
212
|
|
184
213
|
# form parameters
|
185
214
|
form_params = {}
|
215
|
+
form_params["name"] = name
|
216
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
186
217
|
|
187
218
|
# http body (model)
|
188
219
|
post_body = nil
|
189
|
-
|
190
|
-
|
191
|
-
auth_names = ['oauth2-implicit']
|
192
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
220
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
221
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
193
222
|
:header_params => header_params,
|
194
223
|
:query_params => query_params,
|
195
224
|
:form_params => form_params,
|
196
225
|
:body => post_body,
|
197
226
|
:auth_names => auth_names,
|
198
|
-
:return_type => '
|
227
|
+
:return_type => 'Package')
|
199
228
|
if @api_client.config.debugging
|
200
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
229
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
201
230
|
end
|
202
231
|
return data, status_code, headers
|
203
232
|
end
|
204
233
|
|
205
234
|
#
|
206
|
-
#
|
207
|
-
# @param
|
235
|
+
# Create new release in specified package.
|
236
|
+
# @param id_or_name numeric project id or project name
|
237
|
+
# @param package_id
|
238
|
+
# @param name Release name
|
208
239
|
# @param [Hash] opts the optional parameters
|
209
|
-
# @
|
210
|
-
|
211
|
-
|
212
|
-
|
240
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
241
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
242
|
+
# @option opts [String] :release_note Release note body text.
|
243
|
+
# @option opts [String] :change_log Changelog body text.
|
244
|
+
# @return [Release]
|
245
|
+
def create_release(id_or_name, package_id, name, opts = {})
|
246
|
+
data, _status_code, _headers = create_release_with_http_info(id_or_name, package_id, name, opts)
|
247
|
+
return data
|
213
248
|
end
|
214
249
|
|
215
250
|
#
|
216
|
-
#
|
217
|
-
# @param
|
251
|
+
# Create new release in specified package.
|
252
|
+
# @param id_or_name numeric project id or project name
|
253
|
+
# @param package_id
|
254
|
+
# @param name Release name
|
218
255
|
# @param [Hash] opts the optional parameters
|
219
|
-
# @
|
220
|
-
|
256
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
257
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
258
|
+
# @option opts [String] :release_note Release note body text.
|
259
|
+
# @option opts [String] :change_log Changelog body text.
|
260
|
+
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
261
|
+
def create_release_with_http_info(id_or_name, package_id, name, opts = {})
|
221
262
|
if @api_client.config.debugging
|
222
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
263
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.create_release ..."
|
223
264
|
end
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
265
|
+
# verify the required parameter 'id_or_name' is set
|
266
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.create_release" if id_or_name.nil?
|
267
|
+
# verify the required parameter 'package_id' is set
|
268
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.create_release" if package_id.nil?
|
269
|
+
# verify the required parameter 'name' is set
|
270
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ProjectApi.create_release" if name.nil?
|
228
271
|
# resource path
|
229
|
-
|
272
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
230
273
|
|
231
274
|
# query parameters
|
232
275
|
query_params = {}
|
@@ -235,62 +278,74 @@ module OSDNClient
|
|
235
278
|
header_params = {}
|
236
279
|
|
237
280
|
# HTTP header 'Accept' (if needed)
|
238
|
-
|
239
|
-
|
281
|
+
local_header_accept = []
|
282
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
240
283
|
|
241
284
|
# HTTP header 'Content-Type'
|
242
|
-
|
243
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
285
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
286
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
244
287
|
|
245
288
|
# form parameters
|
246
289
|
form_params = {}
|
290
|
+
form_params["name"] = name
|
291
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
292
|
+
form_params["time"] = opts[:'time'] if !opts[:'time'].nil?
|
293
|
+
form_params["release_note"] = opts[:'release_note'] if !opts[:'release_note'].nil?
|
294
|
+
form_params["change_log"] = opts[:'change_log'] if !opts[:'change_log'].nil?
|
247
295
|
|
248
296
|
# http body (model)
|
249
297
|
post_body = nil
|
250
|
-
|
251
|
-
|
252
|
-
auth_names = ['oauth2-implicit']
|
253
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
298
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
299
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
254
300
|
:header_params => header_params,
|
255
301
|
:query_params => query_params,
|
256
302
|
:form_params => form_params,
|
257
303
|
:body => post_body,
|
258
|
-
:auth_names => auth_names
|
304
|
+
:auth_names => auth_names,
|
305
|
+
:return_type => 'Release')
|
259
306
|
if @api_client.config.debugging
|
260
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
307
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
261
308
|
end
|
262
309
|
return data, status_code, headers
|
263
310
|
end
|
264
311
|
|
265
312
|
#
|
266
|
-
#
|
267
|
-
# @param
|
313
|
+
# Create new file in target release.
|
314
|
+
# @param id_or_name numeric project id or project name
|
315
|
+
# @param package_id
|
316
|
+
# @param release_id
|
317
|
+
# @param file Upload file in \"multipart/form-data\".
|
268
318
|
# @param [Hash] opts the optional parameters
|
269
|
-
# @option opts [String] :
|
270
|
-
# @
|
271
|
-
|
272
|
-
|
273
|
-
data, status_code, headers = update_news_with_http_info(news_id, opts)
|
319
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
320
|
+
# @return [RelFile]
|
321
|
+
def create_release_file(id_or_name, package_id, release_id, file, opts = {})
|
322
|
+
data, _status_code, _headers = create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts)
|
274
323
|
return data
|
275
324
|
end
|
276
325
|
|
277
326
|
#
|
278
|
-
#
|
279
|
-
# @param
|
327
|
+
# Create new file in target release.
|
328
|
+
# @param id_or_name numeric project id or project name
|
329
|
+
# @param package_id
|
330
|
+
# @param release_id
|
331
|
+
# @param file Upload file in \"multipart/form-data\".
|
280
332
|
# @param [Hash] opts the optional parameters
|
281
|
-
# @option opts [String] :
|
282
|
-
# @
|
283
|
-
|
284
|
-
def update_news_with_http_info(news_id, opts = {})
|
333
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
334
|
+
# @return [Array<(RelFile, Fixnum, Hash)>] RelFile data, response status code and response headers
|
335
|
+
def create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts = {})
|
285
336
|
if @api_client.config.debugging
|
286
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
337
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.create_release_file ..."
|
287
338
|
end
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
339
|
+
# verify the required parameter 'id_or_name' is set
|
340
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.create_release_file" if id_or_name.nil?
|
341
|
+
# verify the required parameter 'package_id' is set
|
342
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.create_release_file" if package_id.nil?
|
343
|
+
# verify the required parameter 'release_id' is set
|
344
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.create_release_file" if release_id.nil?
|
345
|
+
# verify the required parameter 'file' is set
|
346
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling ProjectApi.create_release_file" if file.nil?
|
292
347
|
# resource path
|
293
|
-
|
348
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
294
349
|
|
295
350
|
# query parameters
|
296
351
|
query_params = {}
|
@@ -299,61 +354,57 @@ module OSDNClient
|
|
299
354
|
header_params = {}
|
300
355
|
|
301
356
|
# HTTP header 'Accept' (if needed)
|
302
|
-
|
303
|
-
|
357
|
+
local_header_accept = []
|
358
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
304
359
|
|
305
360
|
# HTTP header 'Content-Type'
|
306
|
-
|
307
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
361
|
+
local_header_content_type = ['multipart/form-data']
|
362
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
308
363
|
|
309
364
|
# form parameters
|
310
365
|
form_params = {}
|
311
|
-
form_params["
|
312
|
-
form_params["
|
366
|
+
form_params["file"] = file
|
367
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
313
368
|
|
314
369
|
# http body (model)
|
315
370
|
post_body = nil
|
316
|
-
|
317
|
-
|
318
|
-
auth_names = ['oauth2-implicit']
|
319
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
371
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
372
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
320
373
|
:header_params => header_params,
|
321
374
|
:query_params => query_params,
|
322
375
|
:form_params => form_params,
|
323
376
|
:body => post_body,
|
324
377
|
:auth_names => auth_names,
|
325
|
-
:return_type => '
|
378
|
+
:return_type => 'RelFile')
|
326
379
|
if @api_client.config.debugging
|
327
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
380
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
328
381
|
end
|
329
382
|
return data, status_code, headers
|
330
383
|
end
|
331
384
|
|
332
385
|
#
|
333
|
-
#
|
334
|
-
# @param
|
386
|
+
#
|
387
|
+
# @param news_id
|
335
388
|
# @param [Hash] opts the optional parameters
|
336
|
-
# @return [
|
337
|
-
def
|
338
|
-
|
339
|
-
return
|
389
|
+
# @return [nil]
|
390
|
+
def delete_news(news_id, opts = {})
|
391
|
+
delete_news_with_http_info(news_id, opts)
|
392
|
+
return nil
|
340
393
|
end
|
341
394
|
|
342
395
|
#
|
343
|
-
#
|
344
|
-
# @param
|
396
|
+
#
|
397
|
+
# @param news_id
|
345
398
|
# @param [Hash] opts the optional parameters
|
346
|
-
# @return [Array<(
|
347
|
-
def
|
399
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
400
|
+
def delete_news_with_http_info(news_id, opts = {})
|
348
401
|
if @api_client.config.debugging
|
349
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
402
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.delete_news ..."
|
350
403
|
end
|
351
|
-
|
352
|
-
|
353
|
-
fail "Missing the required parameter 'id_or_name' when calling get_project" if id_or_name.nil?
|
354
|
-
|
404
|
+
# verify the required parameter 'news_id' is set
|
405
|
+
fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.delete_news" if news_id.nil?
|
355
406
|
# resource path
|
356
|
-
|
407
|
+
local_var_path = "/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_id.to_s)
|
357
408
|
|
358
409
|
# query parameters
|
359
410
|
query_params = {}
|
@@ -362,59 +413,58 @@ module OSDNClient
|
|
362
413
|
header_params = {}
|
363
414
|
|
364
415
|
# HTTP header 'Accept' (if needed)
|
365
|
-
|
366
|
-
|
416
|
+
local_header_accept = []
|
417
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
367
418
|
|
368
419
|
# HTTP header 'Content-Type'
|
369
|
-
|
370
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
420
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
421
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
371
422
|
|
372
423
|
# form parameters
|
373
424
|
form_params = {}
|
374
425
|
|
375
426
|
# http body (model)
|
376
427
|
post_body = nil
|
377
|
-
|
378
|
-
|
379
|
-
auth_names = ['oauth2-implicit']
|
380
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
428
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
429
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
381
430
|
:header_params => header_params,
|
382
431
|
:query_params => query_params,
|
383
432
|
:form_params => form_params,
|
384
433
|
:body => post_body,
|
385
|
-
:auth_names => auth_names
|
386
|
-
:return_type => 'Group')
|
434
|
+
:auth_names => auth_names)
|
387
435
|
if @api_client.config.debugging
|
388
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
436
|
+
@api_client.config.logger.debug "API called: ProjectApi#delete_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
389
437
|
end
|
390
438
|
return data, status_code, headers
|
391
439
|
end
|
392
440
|
|
393
441
|
#
|
394
|
-
#
|
442
|
+
#
|
395
443
|
# @param id_or_name numeric project id or project name
|
444
|
+
# @param news_id
|
396
445
|
# @param [Hash] opts the optional parameters
|
397
|
-
# @return [
|
398
|
-
def
|
399
|
-
|
400
|
-
return
|
446
|
+
# @return [nil]
|
447
|
+
def delete_news_0(id_or_name, news_id, opts = {})
|
448
|
+
delete_news_0_with_http_info(id_or_name, news_id, opts)
|
449
|
+
return nil
|
401
450
|
end
|
402
451
|
|
403
452
|
#
|
404
|
-
#
|
453
|
+
#
|
405
454
|
# @param id_or_name numeric project id or project name
|
455
|
+
# @param news_id
|
406
456
|
# @param [Hash] opts the optional parameters
|
407
|
-
# @return [Array<(
|
408
|
-
def
|
457
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
458
|
+
def delete_news_0_with_http_info(id_or_name, news_id, opts = {})
|
409
459
|
if @api_client.config.debugging
|
410
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
460
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.delete_news_0 ..."
|
411
461
|
end
|
412
|
-
|
413
462
|
# verify the required parameter 'id_or_name' is set
|
414
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
415
|
-
|
463
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.delete_news_0" if id_or_name.nil?
|
464
|
+
# verify the required parameter 'news_id' is set
|
465
|
+
fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.delete_news_0" if news_id.nil?
|
416
466
|
# resource path
|
417
|
-
|
467
|
+
local_var_path = "/project/{id_or_name}/news/{news_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'news_id' + '}', news_id.to_s)
|
418
468
|
|
419
469
|
# query parameters
|
420
470
|
query_params = {}
|
@@ -423,66 +473,58 @@ module OSDNClient
|
|
423
473
|
header_params = {}
|
424
474
|
|
425
475
|
# HTTP header 'Accept' (if needed)
|
426
|
-
|
427
|
-
|
476
|
+
local_header_accept = []
|
477
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
428
478
|
|
429
479
|
# HTTP header 'Content-Type'
|
430
|
-
|
431
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
480
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
481
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
432
482
|
|
433
483
|
# form parameters
|
434
484
|
form_params = {}
|
435
485
|
|
436
486
|
# http body (model)
|
437
487
|
post_body = nil
|
438
|
-
|
439
|
-
|
440
|
-
auth_names = ['oauth2-implicit']
|
441
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
488
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
489
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
442
490
|
:header_params => header_params,
|
443
491
|
:query_params => query_params,
|
444
492
|
:form_params => form_params,
|
445
493
|
:body => post_body,
|
446
|
-
:auth_names => auth_names
|
447
|
-
:return_type => 'Array<Package>')
|
494
|
+
:auth_names => auth_names)
|
448
495
|
if @api_client.config.debugging
|
449
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
496
|
+
@api_client.config.logger.debug "API called: ProjectApi#delete_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
450
497
|
end
|
451
498
|
return data, status_code, headers
|
452
499
|
end
|
453
500
|
|
454
501
|
#
|
455
|
-
#
|
502
|
+
# Delete taret package.
|
456
503
|
# @param id_or_name numeric project id or project name
|
457
|
-
# @param
|
504
|
+
# @param package_id
|
458
505
|
# @param [Hash] opts the optional parameters
|
459
|
-
# @
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
return data
|
506
|
+
# @return [nil]
|
507
|
+
def delete_package(id_or_name, package_id, opts = {})
|
508
|
+
delete_package_with_http_info(id_or_name, package_id, opts)
|
509
|
+
return nil
|
464
510
|
end
|
465
511
|
|
466
512
|
#
|
467
|
-
#
|
513
|
+
# Delete taret package.
|
468
514
|
# @param id_or_name numeric project id or project name
|
469
|
-
# @param
|
515
|
+
# @param package_id
|
470
516
|
# @param [Hash] opts the optional parameters
|
471
|
-
# @
|
472
|
-
|
473
|
-
def create_package_with_http_info(id_or_name, name, opts = {})
|
517
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
518
|
+
def delete_package_with_http_info(id_or_name, package_id, opts = {})
|
474
519
|
if @api_client.config.debugging
|
475
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
520
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.delete_package ..."
|
476
521
|
end
|
477
|
-
|
478
522
|
# verify the required parameter 'id_or_name' is set
|
479
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
480
|
-
|
481
|
-
|
482
|
-
fail "Missing the required parameter 'name' when calling create_package" if name.nil?
|
483
|
-
|
523
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.delete_package" if id_or_name.nil?
|
524
|
+
# verify the required parameter 'package_id' is set
|
525
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.delete_package" if package_id.nil?
|
484
526
|
# resource path
|
485
|
-
|
527
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
486
528
|
|
487
529
|
# query parameters
|
488
530
|
query_params = {}
|
@@ -491,66 +533,62 @@ module OSDNClient
|
|
491
533
|
header_params = {}
|
492
534
|
|
493
535
|
# HTTP header 'Accept' (if needed)
|
494
|
-
|
495
|
-
|
536
|
+
local_header_accept = []
|
537
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
496
538
|
|
497
539
|
# HTTP header 'Content-Type'
|
498
|
-
|
499
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
540
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
541
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
500
542
|
|
501
543
|
# form parameters
|
502
544
|
form_params = {}
|
503
|
-
form_params["name"] = name
|
504
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
505
545
|
|
506
546
|
# http body (model)
|
507
547
|
post_body = nil
|
508
|
-
|
509
|
-
|
510
|
-
auth_names = ['oauth2-implicit']
|
511
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
548
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
549
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
512
550
|
:header_params => header_params,
|
513
551
|
:query_params => query_params,
|
514
552
|
:form_params => form_params,
|
515
553
|
:body => post_body,
|
516
|
-
:auth_names => auth_names
|
517
|
-
:return_type => 'Package')
|
554
|
+
:auth_names => auth_names)
|
518
555
|
if @api_client.config.debugging
|
519
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
556
|
+
@api_client.config.logger.debug "API called: ProjectApi#delete_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
520
557
|
end
|
521
558
|
return data, status_code, headers
|
522
559
|
end
|
523
560
|
|
524
561
|
#
|
525
|
-
#
|
562
|
+
# Delete target release.
|
526
563
|
# @param id_or_name numeric project id or project name
|
527
564
|
# @param package_id
|
565
|
+
# @param release_id
|
528
566
|
# @param [Hash] opts the optional parameters
|
529
|
-
# @return [
|
530
|
-
def
|
531
|
-
|
532
|
-
return
|
567
|
+
# @return [nil]
|
568
|
+
def delete_release(id_or_name, package_id, release_id, opts = {})
|
569
|
+
delete_release_with_http_info(id_or_name, package_id, release_id, opts)
|
570
|
+
return nil
|
533
571
|
end
|
534
572
|
|
535
573
|
#
|
536
|
-
#
|
574
|
+
# Delete target release.
|
537
575
|
# @param id_or_name numeric project id or project name
|
538
576
|
# @param package_id
|
577
|
+
# @param release_id
|
539
578
|
# @param [Hash] opts the optional parameters
|
540
|
-
# @return [Array<(
|
541
|
-
def
|
579
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
580
|
+
def delete_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
542
581
|
if @api_client.config.debugging
|
543
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
582
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.delete_release ..."
|
544
583
|
end
|
545
|
-
|
546
584
|
# verify the required parameter 'id_or_name' is set
|
547
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
548
|
-
|
585
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.delete_release" if id_or_name.nil?
|
549
586
|
# verify the required parameter 'package_id' is set
|
550
|
-
fail "Missing the required parameter 'package_id' when calling
|
551
|
-
|
587
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.delete_release" if package_id.nil?
|
588
|
+
# verify the required parameter 'release_id' is set
|
589
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.delete_release" if release_id.nil?
|
552
590
|
# resource path
|
553
|
-
|
591
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
554
592
|
|
555
593
|
# query parameters
|
556
594
|
query_params = {}
|
@@ -559,77 +597,66 @@ module OSDNClient
|
|
559
597
|
header_params = {}
|
560
598
|
|
561
599
|
# HTTP header 'Accept' (if needed)
|
562
|
-
|
563
|
-
|
600
|
+
local_header_accept = []
|
601
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
564
602
|
|
565
603
|
# HTTP header 'Content-Type'
|
566
|
-
|
567
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
604
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
605
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
568
606
|
|
569
607
|
# form parameters
|
570
608
|
form_params = {}
|
571
609
|
|
572
610
|
# http body (model)
|
573
611
|
post_body = nil
|
574
|
-
|
575
|
-
|
576
|
-
auth_names = ['oauth2-implicit']
|
577
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
612
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
613
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
578
614
|
:header_params => header_params,
|
579
615
|
:query_params => query_params,
|
580
616
|
:form_params => form_params,
|
581
617
|
:body => post_body,
|
582
|
-
:auth_names => auth_names
|
583
|
-
:return_type => 'Package')
|
618
|
+
:auth_names => auth_names)
|
584
619
|
if @api_client.config.debugging
|
585
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
620
|
+
@api_client.config.logger.debug "API called: ProjectApi#delete_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
586
621
|
end
|
587
622
|
return data, status_code, headers
|
588
623
|
end
|
589
624
|
|
590
625
|
#
|
591
|
-
#
|
626
|
+
# Delete target file.
|
592
627
|
# @param id_or_name numeric project id or project name
|
593
628
|
# @param package_id
|
594
|
-
# @param
|
629
|
+
# @param release_id
|
630
|
+
# @param file_id
|
595
631
|
# @param [Hash] opts the optional parameters
|
596
|
-
# @
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
# @return [Release]
|
601
|
-
def create_release(id_or_name, package_id, name, opts = {})
|
602
|
-
data, status_code, headers = create_release_with_http_info(id_or_name, package_id, name, opts)
|
603
|
-
return data
|
632
|
+
# @return [nil]
|
633
|
+
def delete_release_file(id_or_name, package_id, release_id, file_id, opts = {})
|
634
|
+
delete_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
|
635
|
+
return nil
|
604
636
|
end
|
605
637
|
|
606
638
|
#
|
607
|
-
#
|
639
|
+
# Delete target file.
|
608
640
|
# @param id_or_name numeric project id or project name
|
609
641
|
# @param package_id
|
610
|
-
# @param
|
642
|
+
# @param release_id
|
643
|
+
# @param file_id
|
611
644
|
# @param [Hash] opts the optional parameters
|
612
|
-
# @
|
613
|
-
|
614
|
-
# @option opts [String] :release_note Release note body text.
|
615
|
-
# @option opts [String] :change_log Changelog body text.
|
616
|
-
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
617
|
-
def create_release_with_http_info(id_or_name, package_id, name, opts = {})
|
645
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
646
|
+
def delete_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
|
618
647
|
if @api_client.config.debugging
|
619
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
648
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.delete_release_file ..."
|
620
649
|
end
|
621
|
-
|
622
650
|
# verify the required parameter 'id_or_name' is set
|
623
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
624
|
-
|
651
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.delete_release_file" if id_or_name.nil?
|
625
652
|
# verify the required parameter 'package_id' is set
|
626
|
-
fail "Missing the required parameter 'package_id' when calling
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
653
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.delete_release_file" if package_id.nil?
|
654
|
+
# verify the required parameter 'release_id' is set
|
655
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.delete_release_file" if release_id.nil?
|
656
|
+
# verify the required parameter 'file_id' is set
|
657
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectApi.delete_release_file" if file_id.nil?
|
631
658
|
# resource path
|
632
|
-
|
659
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}/{file_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s).sub('{' + 'file_id' + '}', file_id.to_s)
|
633
660
|
|
634
661
|
# query parameters
|
635
662
|
query_params = {}
|
@@ -638,69 +665,58 @@ module OSDNClient
|
|
638
665
|
header_params = {}
|
639
666
|
|
640
667
|
# HTTP header 'Accept' (if needed)
|
641
|
-
|
642
|
-
|
668
|
+
local_header_accept = []
|
669
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
643
670
|
|
644
671
|
# HTTP header 'Content-Type'
|
645
|
-
|
646
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
672
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
673
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
647
674
|
|
648
675
|
# form parameters
|
649
676
|
form_params = {}
|
650
|
-
form_params["name"] = name
|
651
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
652
|
-
form_params["time"] = opts[:'time'] if opts[:'time']
|
653
|
-
form_params["release_note"] = opts[:'release_note'] if opts[:'release_note']
|
654
|
-
form_params["change_log"] = opts[:'change_log'] if opts[:'change_log']
|
655
677
|
|
656
678
|
# http body (model)
|
657
679
|
post_body = nil
|
658
|
-
|
659
|
-
|
660
|
-
auth_names = ['oauth2-implicit']
|
661
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
680
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
681
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
662
682
|
:header_params => header_params,
|
663
683
|
:query_params => query_params,
|
664
684
|
:form_params => form_params,
|
665
685
|
:body => post_body,
|
666
|
-
:auth_names => auth_names
|
667
|
-
:return_type => 'Release')
|
686
|
+
:auth_names => auth_names)
|
668
687
|
if @api_client.config.debugging
|
669
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
688
|
+
@api_client.config.logger.debug "API called: ProjectApi#delete_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
670
689
|
end
|
671
690
|
return data, status_code, headers
|
672
691
|
end
|
673
692
|
|
674
693
|
#
|
675
|
-
#
|
694
|
+
# Get release draft in specified package. If draft is not exist, it will be created automatically.
|
676
695
|
# @param id_or_name numeric project id or project name
|
677
696
|
# @param package_id
|
678
697
|
# @param [Hash] opts the optional parameters
|
679
|
-
# @return [
|
680
|
-
def
|
681
|
-
|
682
|
-
return
|
698
|
+
# @return [Release]
|
699
|
+
def draft_release(id_or_name, package_id, opts = {})
|
700
|
+
data, _status_code, _headers = draft_release_with_http_info(id_or_name, package_id, opts)
|
701
|
+
return data
|
683
702
|
end
|
684
703
|
|
685
704
|
#
|
686
|
-
#
|
705
|
+
# Get release draft in specified package. If draft is not exist, it will be created automatically.
|
687
706
|
# @param id_or_name numeric project id or project name
|
688
707
|
# @param package_id
|
689
708
|
# @param [Hash] opts the optional parameters
|
690
|
-
# @return [Array<(
|
691
|
-
def
|
709
|
+
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
710
|
+
def draft_release_with_http_info(id_or_name, package_id, opts = {})
|
692
711
|
if @api_client.config.debugging
|
693
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
712
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.draft_release ..."
|
694
713
|
end
|
695
|
-
|
696
714
|
# verify the required parameter 'id_or_name' is set
|
697
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
698
|
-
|
715
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.draft_release" if id_or_name.nil?
|
699
716
|
# verify the required parameter 'package_id' is set
|
700
|
-
fail "Missing the required parameter 'package_id' when calling
|
701
|
-
|
717
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.draft_release" if package_id.nil?
|
702
718
|
# resource path
|
703
|
-
|
719
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/draft".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
704
720
|
|
705
721
|
# query parameters
|
706
722
|
query_params = {}
|
@@ -709,67 +725,55 @@ module OSDNClient
|
|
709
725
|
header_params = {}
|
710
726
|
|
711
727
|
# HTTP header 'Accept' (if needed)
|
712
|
-
|
713
|
-
|
728
|
+
local_header_accept = []
|
729
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
714
730
|
|
715
731
|
# HTTP header 'Content-Type'
|
716
|
-
|
717
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
732
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
733
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
718
734
|
|
719
735
|
# form parameters
|
720
736
|
form_params = {}
|
721
737
|
|
722
738
|
# http body (model)
|
723
739
|
post_body = nil
|
724
|
-
|
725
|
-
|
726
|
-
auth_names = ['oauth2-implicit']
|
727
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
740
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
741
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
728
742
|
:header_params => header_params,
|
729
743
|
:query_params => query_params,
|
730
744
|
:form_params => form_params,
|
731
745
|
:body => post_body,
|
732
|
-
:auth_names => auth_names
|
746
|
+
:auth_names => auth_names,
|
747
|
+
:return_type => 'Release')
|
733
748
|
if @api_client.config.debugging
|
734
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
749
|
+
@api_client.config.logger.debug "API called: ProjectApi#draft_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
735
750
|
end
|
736
751
|
return data, status_code, headers
|
737
752
|
end
|
738
753
|
|
739
754
|
#
|
740
|
-
#
|
741
|
-
# @param
|
742
|
-
# @param package_id
|
755
|
+
# Get single news object.
|
756
|
+
# @param news_id
|
743
757
|
# @param [Hash] opts the optional parameters
|
744
|
-
# @
|
745
|
-
|
746
|
-
|
747
|
-
def update_package(id_or_name, package_id, opts = {})
|
748
|
-
data, status_code, headers = update_package_with_http_info(id_or_name, package_id, opts)
|
758
|
+
# @return [News]
|
759
|
+
def get_news(news_id, opts = {})
|
760
|
+
data, _status_code, _headers = get_news_with_http_info(news_id, opts)
|
749
761
|
return data
|
750
762
|
end
|
751
763
|
|
752
764
|
#
|
753
|
-
#
|
754
|
-
# @param
|
755
|
-
# @param package_id
|
765
|
+
# Get single news object.
|
766
|
+
# @param news_id
|
756
767
|
# @param [Hash] opts the optional parameters
|
757
|
-
# @
|
758
|
-
|
759
|
-
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
760
|
-
def update_package_with_http_info(id_or_name, package_id, opts = {})
|
768
|
+
# @return [Array<(News, Fixnum, Hash)>] News data, response status code and response headers
|
769
|
+
def get_news_with_http_info(news_id, opts = {})
|
761
770
|
if @api_client.config.debugging
|
762
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
771
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.get_news ..."
|
763
772
|
end
|
764
|
-
|
765
|
-
|
766
|
-
fail "Missing the required parameter 'id_or_name' when calling update_package" if id_or_name.nil?
|
767
|
-
|
768
|
-
# verify the required parameter 'package_id' is set
|
769
|
-
fail "Missing the required parameter 'package_id' when calling update_package" if package_id.nil?
|
770
|
-
|
773
|
+
# verify the required parameter 'news_id' is set
|
774
|
+
fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.get_news" if news_id.nil?
|
771
775
|
# resource path
|
772
|
-
|
776
|
+
local_var_path = "/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_id.to_s)
|
773
777
|
|
774
778
|
# query parameters
|
775
779
|
query_params = {}
|
@@ -778,66 +782,59 @@ module OSDNClient
|
|
778
782
|
header_params = {}
|
779
783
|
|
780
784
|
# HTTP header 'Accept' (if needed)
|
781
|
-
|
782
|
-
|
785
|
+
local_header_accept = []
|
786
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
783
787
|
|
784
788
|
# HTTP header 'Content-Type'
|
785
|
-
|
786
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
789
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
790
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
787
791
|
|
788
792
|
# form parameters
|
789
793
|
form_params = {}
|
790
|
-
form_params["name"] = opts[:'name'] if opts[:'name']
|
791
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
792
794
|
|
793
795
|
# http body (model)
|
794
796
|
post_body = nil
|
795
|
-
|
796
|
-
|
797
|
-
auth_names = ['oauth2-implicit']
|
798
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
797
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
798
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
799
799
|
:header_params => header_params,
|
800
800
|
:query_params => query_params,
|
801
801
|
:form_params => form_params,
|
802
802
|
:body => post_body,
|
803
803
|
:auth_names => auth_names,
|
804
|
-
:return_type => '
|
804
|
+
:return_type => 'News')
|
805
805
|
if @api_client.config.debugging
|
806
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
806
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
807
807
|
end
|
808
808
|
return data, status_code, headers
|
809
809
|
end
|
810
810
|
|
811
811
|
#
|
812
|
-
# Get
|
812
|
+
# Get single news object.
|
813
813
|
# @param id_or_name numeric project id or project name
|
814
|
-
# @param
|
814
|
+
# @param news_id
|
815
815
|
# @param [Hash] opts the optional parameters
|
816
|
-
# @return [
|
817
|
-
def
|
818
|
-
data,
|
816
|
+
# @return [News]
|
817
|
+
def get_news_0(id_or_name, news_id, opts = {})
|
818
|
+
data, _status_code, _headers = get_news_0_with_http_info(id_or_name, news_id, opts)
|
819
819
|
return data
|
820
820
|
end
|
821
821
|
|
822
822
|
#
|
823
|
-
# Get
|
823
|
+
# Get single news object.
|
824
824
|
# @param id_or_name numeric project id or project name
|
825
|
-
# @param
|
825
|
+
# @param news_id
|
826
826
|
# @param [Hash] opts the optional parameters
|
827
|
-
# @return [Array<(
|
828
|
-
def
|
827
|
+
# @return [Array<(News, Fixnum, Hash)>] News data, response status code and response headers
|
828
|
+
def get_news_0_with_http_info(id_or_name, news_id, opts = {})
|
829
829
|
if @api_client.config.debugging
|
830
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
830
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.get_news_0 ..."
|
831
831
|
end
|
832
|
-
|
833
832
|
# verify the required parameter 'id_or_name' is set
|
834
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
835
|
-
|
836
|
-
|
837
|
-
fail "Missing the required parameter 'package_id' when calling draft_release" if package_id.nil?
|
838
|
-
|
833
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.get_news_0" if id_or_name.nil?
|
834
|
+
# verify the required parameter 'news_id' is set
|
835
|
+
fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.get_news_0" if news_id.nil?
|
839
836
|
# resource path
|
840
|
-
|
837
|
+
local_var_path = "/project/{id_or_name}/news/{news_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'news_id' + '}', news_id.to_s)
|
841
838
|
|
842
839
|
# query parameters
|
843
840
|
query_params = {}
|
@@ -846,69 +843,59 @@ module OSDNClient
|
|
846
843
|
header_params = {}
|
847
844
|
|
848
845
|
# HTTP header 'Accept' (if needed)
|
849
|
-
|
850
|
-
|
846
|
+
local_header_accept = []
|
847
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
851
848
|
|
852
849
|
# HTTP header 'Content-Type'
|
853
|
-
|
854
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
850
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
851
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
855
852
|
|
856
853
|
# form parameters
|
857
854
|
form_params = {}
|
858
855
|
|
859
856
|
# http body (model)
|
860
857
|
post_body = nil
|
861
|
-
|
862
|
-
|
863
|
-
auth_names = ['oauth2-implicit']
|
864
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
858
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
859
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
865
860
|
:header_params => header_params,
|
866
861
|
:query_params => query_params,
|
867
862
|
:form_params => form_params,
|
868
863
|
:body => post_body,
|
869
864
|
:auth_names => auth_names,
|
870
|
-
:return_type => '
|
865
|
+
:return_type => 'News')
|
871
866
|
if @api_client.config.debugging
|
872
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
867
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
873
868
|
end
|
874
869
|
return data, status_code, headers
|
875
870
|
end
|
876
871
|
|
877
872
|
#
|
878
|
-
# Get specified
|
873
|
+
# Get specified package info and release list of the package.
|
879
874
|
# @param id_or_name numeric project id or project name
|
880
875
|
# @param package_id
|
881
|
-
# @param release_id
|
882
876
|
# @param [Hash] opts the optional parameters
|
883
|
-
# @return [
|
884
|
-
def
|
885
|
-
data,
|
877
|
+
# @return [Package]
|
878
|
+
def get_package(id_or_name, package_id, opts = {})
|
879
|
+
data, _status_code, _headers = get_package_with_http_info(id_or_name, package_id, opts)
|
886
880
|
return data
|
887
881
|
end
|
888
882
|
|
889
883
|
#
|
890
|
-
# Get specified
|
884
|
+
# Get specified package info and release list of the package.
|
891
885
|
# @param id_or_name numeric project id or project name
|
892
886
|
# @param package_id
|
893
|
-
# @param release_id
|
894
887
|
# @param [Hash] opts the optional parameters
|
895
|
-
# @return [Array<(
|
896
|
-
def
|
888
|
+
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
889
|
+
def get_package_with_http_info(id_or_name, package_id, opts = {})
|
897
890
|
if @api_client.config.debugging
|
898
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
891
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.get_package ..."
|
899
892
|
end
|
900
|
-
|
901
893
|
# verify the required parameter 'id_or_name' is set
|
902
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
903
|
-
|
894
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.get_package" if id_or_name.nil?
|
904
895
|
# verify the required parameter 'package_id' is set
|
905
|
-
fail "Missing the required parameter 'package_id' when calling
|
906
|
-
|
907
|
-
# verify the required parameter 'release_id' is set
|
908
|
-
fail "Missing the required parameter 'release_id' when calling get_release" if release_id.nil?
|
909
|
-
|
896
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.get_package" if package_id.nil?
|
910
897
|
# resource path
|
911
|
-
|
898
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
912
899
|
|
913
900
|
# query parameters
|
914
901
|
query_params = {}
|
@@ -917,76 +904,55 @@ module OSDNClient
|
|
917
904
|
header_params = {}
|
918
905
|
|
919
906
|
# HTTP header 'Accept' (if needed)
|
920
|
-
|
921
|
-
|
907
|
+
local_header_accept = []
|
908
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
922
909
|
|
923
910
|
# HTTP header 'Content-Type'
|
924
|
-
|
925
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
911
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
912
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
926
913
|
|
927
914
|
# form parameters
|
928
915
|
form_params = {}
|
929
916
|
|
930
917
|
# http body (model)
|
931
918
|
post_body = nil
|
932
|
-
|
933
|
-
|
934
|
-
auth_names = ['oauth2-implicit']
|
935
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
919
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
920
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
936
921
|
:header_params => header_params,
|
937
922
|
:query_params => query_params,
|
938
923
|
:form_params => form_params,
|
939
924
|
:body => post_body,
|
940
925
|
:auth_names => auth_names,
|
941
|
-
:return_type => '
|
926
|
+
:return_type => 'Package')
|
942
927
|
if @api_client.config.debugging
|
943
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
928
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
944
929
|
end
|
945
930
|
return data, status_code, headers
|
946
931
|
end
|
947
932
|
|
948
933
|
#
|
949
|
-
#
|
934
|
+
# Get project info.
|
950
935
|
# @param id_or_name numeric project id or project name
|
951
|
-
# @param package_id
|
952
|
-
# @param release_id
|
953
|
-
# @param file Upload file in \"multipart/form-data\".
|
954
936
|
# @param [Hash] opts the optional parameters
|
955
|
-
# @
|
956
|
-
|
957
|
-
|
958
|
-
data, status_code, headers = create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts)
|
937
|
+
# @return [Group]
|
938
|
+
def get_project(id_or_name, opts = {})
|
939
|
+
data, _status_code, _headers = get_project_with_http_info(id_or_name, opts)
|
959
940
|
return data
|
960
941
|
end
|
961
942
|
|
962
943
|
#
|
963
|
-
#
|
944
|
+
# Get project info.
|
964
945
|
# @param id_or_name numeric project id or project name
|
965
|
-
# @param package_id
|
966
|
-
# @param release_id
|
967
|
-
# @param file Upload file in \"multipart/form-data\".
|
968
946
|
# @param [Hash] opts the optional parameters
|
969
|
-
# @
|
970
|
-
|
971
|
-
def create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts = {})
|
947
|
+
# @return [Array<(Group, Fixnum, Hash)>] Group data, response status code and response headers
|
948
|
+
def get_project_with_http_info(id_or_name, opts = {})
|
972
949
|
if @api_client.config.debugging
|
973
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
950
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.get_project ..."
|
974
951
|
end
|
975
|
-
|
976
952
|
# verify the required parameter 'id_or_name' is set
|
977
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
978
|
-
|
979
|
-
# verify the required parameter 'package_id' is set
|
980
|
-
fail "Missing the required parameter 'package_id' when calling create_release_file" if package_id.nil?
|
981
|
-
|
982
|
-
# verify the required parameter 'release_id' is set
|
983
|
-
fail "Missing the required parameter 'release_id' when calling create_release_file" if release_id.nil?
|
984
|
-
|
985
|
-
# verify the required parameter 'file' is set
|
986
|
-
fail "Missing the required parameter 'file' when calling create_release_file" if file.nil?
|
987
|
-
|
953
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.get_project" if id_or_name.nil?
|
988
954
|
# resource path
|
989
|
-
|
955
|
+
local_var_path = "/project/{id_or_name}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
990
956
|
|
991
957
|
# query parameters
|
992
958
|
query_params = {}
|
@@ -995,71 +961,63 @@ module OSDNClient
|
|
995
961
|
header_params = {}
|
996
962
|
|
997
963
|
# HTTP header 'Accept' (if needed)
|
998
|
-
|
999
|
-
|
964
|
+
local_header_accept = []
|
965
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1000
966
|
|
1001
967
|
# HTTP header 'Content-Type'
|
1002
|
-
|
1003
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
968
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
969
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1004
970
|
|
1005
971
|
# form parameters
|
1006
972
|
form_params = {}
|
1007
|
-
form_params["file"] = file
|
1008
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
1009
973
|
|
1010
974
|
# http body (model)
|
1011
975
|
post_body = nil
|
1012
|
-
|
1013
|
-
|
1014
|
-
auth_names = ['oauth2-implicit']
|
1015
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
976
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
977
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1016
978
|
:header_params => header_params,
|
1017
979
|
:query_params => query_params,
|
1018
980
|
:form_params => form_params,
|
1019
981
|
:body => post_body,
|
1020
982
|
:auth_names => auth_names,
|
1021
|
-
:return_type => '
|
983
|
+
:return_type => 'Group')
|
1022
984
|
if @api_client.config.debugging
|
1023
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
985
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1024
986
|
end
|
1025
987
|
return data, status_code, headers
|
1026
988
|
end
|
1027
989
|
|
1028
990
|
#
|
1029
|
-
#
|
991
|
+
# Get specified release info and file list of the release.
|
1030
992
|
# @param id_or_name numeric project id or project name
|
1031
993
|
# @param package_id
|
1032
994
|
# @param release_id
|
1033
995
|
# @param [Hash] opts the optional parameters
|
1034
|
-
# @return [
|
1035
|
-
def
|
1036
|
-
|
1037
|
-
return
|
996
|
+
# @return [Release]
|
997
|
+
def get_release(id_or_name, package_id, release_id, opts = {})
|
998
|
+
data, _status_code, _headers = get_release_with_http_info(id_or_name, package_id, release_id, opts)
|
999
|
+
return data
|
1038
1000
|
end
|
1039
1001
|
|
1040
1002
|
#
|
1041
|
-
#
|
1003
|
+
# Get specified release info and file list of the release.
|
1042
1004
|
# @param id_or_name numeric project id or project name
|
1043
1005
|
# @param package_id
|
1044
1006
|
# @param release_id
|
1045
1007
|
# @param [Hash] opts the optional parameters
|
1046
|
-
# @return [Array<(
|
1047
|
-
def
|
1008
|
+
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
1009
|
+
def get_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
1048
1010
|
if @api_client.config.debugging
|
1049
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1011
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.get_release ..."
|
1050
1012
|
end
|
1051
|
-
|
1052
1013
|
# verify the required parameter 'id_or_name' is set
|
1053
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1054
|
-
|
1014
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.get_release" if id_or_name.nil?
|
1055
1015
|
# verify the required parameter 'package_id' is set
|
1056
|
-
fail "Missing the required parameter 'package_id' when calling
|
1057
|
-
|
1016
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.get_release" if package_id.nil?
|
1058
1017
|
# verify the required parameter 'release_id' is set
|
1059
|
-
fail "Missing the required parameter 'release_id' when calling
|
1060
|
-
|
1018
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.get_release" if release_id.nil?
|
1061
1019
|
# resource path
|
1062
|
-
|
1020
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
1063
1021
|
|
1064
1022
|
# query parameters
|
1065
1023
|
query_params = {}
|
@@ -1068,76 +1026,67 @@ module OSDNClient
|
|
1068
1026
|
header_params = {}
|
1069
1027
|
|
1070
1028
|
# HTTP header 'Accept' (if needed)
|
1071
|
-
|
1072
|
-
|
1029
|
+
local_header_accept = []
|
1030
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1073
1031
|
|
1074
1032
|
# HTTP header 'Content-Type'
|
1075
|
-
|
1076
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1033
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1034
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1077
1035
|
|
1078
1036
|
# form parameters
|
1079
1037
|
form_params = {}
|
1080
1038
|
|
1081
1039
|
# http body (model)
|
1082
1040
|
post_body = nil
|
1083
|
-
|
1084
|
-
|
1085
|
-
auth_names = ['oauth2-implicit']
|
1086
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
1041
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1042
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1087
1043
|
:header_params => header_params,
|
1088
1044
|
:query_params => query_params,
|
1089
1045
|
:form_params => form_params,
|
1090
1046
|
:body => post_body,
|
1091
|
-
:auth_names => auth_names
|
1047
|
+
:auth_names => auth_names,
|
1048
|
+
:return_type => 'Release')
|
1092
1049
|
if @api_client.config.debugging
|
1093
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1050
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1094
1051
|
end
|
1095
1052
|
return data, status_code, headers
|
1096
1053
|
end
|
1097
1054
|
|
1098
1055
|
#
|
1099
|
-
#
|
1056
|
+
# Get single file object.
|
1100
1057
|
# @param id_or_name numeric project id or project name
|
1101
1058
|
# @param package_id
|
1102
1059
|
# @param release_id
|
1060
|
+
# @param file_id
|
1103
1061
|
# @param [Hash] opts the optional parameters
|
1104
|
-
# @
|
1105
|
-
|
1106
|
-
|
1107
|
-
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
1108
|
-
# @return [Release]
|
1109
|
-
def update_release(id_or_name, package_id, release_id, opts = {})
|
1110
|
-
data, status_code, headers = update_release_with_http_info(id_or_name, package_id, release_id, opts)
|
1062
|
+
# @return [RelFile]
|
1063
|
+
def get_release_file(id_or_name, package_id, release_id, file_id, opts = {})
|
1064
|
+
data, _status_code, _headers = get_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
|
1111
1065
|
return data
|
1112
1066
|
end
|
1113
1067
|
|
1114
1068
|
#
|
1115
|
-
#
|
1069
|
+
# Get single file object.
|
1116
1070
|
# @param id_or_name numeric project id or project name
|
1117
1071
|
# @param package_id
|
1118
1072
|
# @param release_id
|
1119
|
-
# @param
|
1120
|
-
# @
|
1121
|
-
# @
|
1122
|
-
|
1123
|
-
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
1124
|
-
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
1125
|
-
def update_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
1073
|
+
# @param file_id
|
1074
|
+
# @param [Hash] opts the optional parameters
|
1075
|
+
# @return [Array<(RelFile, Fixnum, Hash)>] RelFile data, response status code and response headers
|
1076
|
+
def get_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
|
1126
1077
|
if @api_client.config.debugging
|
1127
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1078
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.get_release_file ..."
|
1128
1079
|
end
|
1129
|
-
|
1130
1080
|
# verify the required parameter 'id_or_name' is set
|
1131
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1132
|
-
|
1081
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.get_release_file" if id_or_name.nil?
|
1133
1082
|
# verify the required parameter 'package_id' is set
|
1134
|
-
fail "Missing the required parameter 'package_id' when calling
|
1135
|
-
|
1083
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.get_release_file" if package_id.nil?
|
1136
1084
|
# verify the required parameter 'release_id' is set
|
1137
|
-
fail "Missing the required parameter 'release_id' when calling
|
1138
|
-
|
1085
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.get_release_file" if release_id.nil?
|
1086
|
+
# verify the required parameter 'file_id' is set
|
1087
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectApi.get_release_file" if file_id.nil?
|
1139
1088
|
# resource path
|
1140
|
-
|
1089
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}/{file_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s).sub('{' + 'file_id' + '}', file_id.to_s)
|
1141
1090
|
|
1142
1091
|
# query parameters
|
1143
1092
|
query_params = {}
|
@@ -1146,154 +1095,111 @@ module OSDNClient
|
|
1146
1095
|
header_params = {}
|
1147
1096
|
|
1148
1097
|
# HTTP header 'Accept' (if needed)
|
1149
|
-
|
1150
|
-
|
1098
|
+
local_header_accept = []
|
1099
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1151
1100
|
|
1152
1101
|
# HTTP header 'Content-Type'
|
1153
|
-
|
1154
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1102
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1103
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1155
1104
|
|
1156
1105
|
# form parameters
|
1157
1106
|
form_params = {}
|
1158
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
1159
|
-
form_params["name"] = opts[:'name'] if opts[:'name']
|
1160
|
-
form_params["time"] = opts[:'time'] if opts[:'time']
|
1161
|
-
form_params["move_to_package_id"] = opts[:'move_to_package_id'] if opts[:'move_to_package_id']
|
1162
1107
|
|
1163
1108
|
# http body (model)
|
1164
1109
|
post_body = nil
|
1165
|
-
|
1166
|
-
|
1167
|
-
auth_names = ['oauth2-implicit']
|
1168
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
1110
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1111
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1169
1112
|
:header_params => header_params,
|
1170
1113
|
:query_params => query_params,
|
1171
1114
|
:form_params => form_params,
|
1172
1115
|
:body => post_body,
|
1173
1116
|
:auth_names => auth_names,
|
1174
|
-
:return_type => '
|
1117
|
+
:return_type => 'RelFile')
|
1175
1118
|
if @api_client.config.debugging
|
1176
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1119
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1177
1120
|
end
|
1178
1121
|
return data, status_code, headers
|
1179
1122
|
end
|
1180
1123
|
|
1181
1124
|
#
|
1182
|
-
#
|
1183
|
-
# @param id_or_name numeric project id or project name
|
1184
|
-
# @param package_id
|
1185
|
-
# @param release_id
|
1186
|
-
# @param file_id
|
1125
|
+
#
|
1187
1126
|
# @param [Hash] opts the optional parameters
|
1188
|
-
# @
|
1189
|
-
|
1190
|
-
|
1127
|
+
# @option opts [Integer] :group_id filter by group ID
|
1128
|
+
# @return [Array<News>]
|
1129
|
+
def list_news(opts = {})
|
1130
|
+
data, _status_code, _headers = list_news_with_http_info(opts)
|
1191
1131
|
return data
|
1192
1132
|
end
|
1193
1133
|
|
1194
1134
|
#
|
1195
|
-
#
|
1196
|
-
# @param id_or_name numeric project id or project name
|
1197
|
-
# @param package_id
|
1198
|
-
# @param release_id
|
1199
|
-
# @param file_id
|
1135
|
+
#
|
1200
1136
|
# @param [Hash] opts the optional parameters
|
1201
|
-
# @
|
1202
|
-
|
1137
|
+
# @option opts [Integer] :group_id filter by group ID
|
1138
|
+
# @return [Array<(Array<News>, Fixnum, Hash)>] Array<News> data, response status code and response headers
|
1139
|
+
def list_news_with_http_info(opts = {})
|
1203
1140
|
if @api_client.config.debugging
|
1204
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1141
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.list_news ..."
|
1205
1142
|
end
|
1206
|
-
|
1207
|
-
# verify the required parameter 'id_or_name' is set
|
1208
|
-
fail "Missing the required parameter 'id_or_name' when calling get_release_file" if id_or_name.nil?
|
1209
|
-
|
1210
|
-
# verify the required parameter 'package_id' is set
|
1211
|
-
fail "Missing the required parameter 'package_id' when calling get_release_file" if package_id.nil?
|
1212
|
-
|
1213
|
-
# verify the required parameter 'release_id' is set
|
1214
|
-
fail "Missing the required parameter 'release_id' when calling get_release_file" if release_id.nil?
|
1215
|
-
|
1216
|
-
# verify the required parameter 'file_id' is set
|
1217
|
-
fail "Missing the required parameter 'file_id' when calling get_release_file" if file_id.nil?
|
1218
|
-
|
1219
1143
|
# resource path
|
1220
|
-
|
1144
|
+
local_var_path = "/news".sub('{format}','json')
|
1221
1145
|
|
1222
1146
|
# query parameters
|
1223
1147
|
query_params = {}
|
1148
|
+
query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
|
1224
1149
|
|
1225
1150
|
# header parameters
|
1226
1151
|
header_params = {}
|
1227
1152
|
|
1228
1153
|
# HTTP header 'Accept' (if needed)
|
1229
|
-
|
1230
|
-
|
1154
|
+
local_header_accept = []
|
1155
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1231
1156
|
|
1232
1157
|
# HTTP header 'Content-Type'
|
1233
|
-
|
1234
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1158
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1159
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1235
1160
|
|
1236
1161
|
# form parameters
|
1237
1162
|
form_params = {}
|
1238
1163
|
|
1239
1164
|
# http body (model)
|
1240
1165
|
post_body = nil
|
1241
|
-
|
1242
|
-
|
1243
|
-
auth_names = ['oauth2-implicit']
|
1244
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
1166
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1167
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1245
1168
|
:header_params => header_params,
|
1246
1169
|
:query_params => query_params,
|
1247
1170
|
:form_params => form_params,
|
1248
1171
|
:body => post_body,
|
1249
1172
|
:auth_names => auth_names,
|
1250
|
-
:return_type => '
|
1173
|
+
:return_type => 'Array<News>')
|
1251
1174
|
if @api_client.config.debugging
|
1252
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1175
|
+
@api_client.config.logger.debug "API called: ProjectApi#list_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1253
1176
|
end
|
1254
1177
|
return data, status_code, headers
|
1255
1178
|
end
|
1256
1179
|
|
1257
1180
|
#
|
1258
|
-
#
|
1181
|
+
# Get news list of spscified project.
|
1259
1182
|
# @param id_or_name numeric project id or project name
|
1260
|
-
# @param package_id
|
1261
|
-
# @param release_id
|
1262
|
-
# @param file_id
|
1263
1183
|
# @param [Hash] opts the optional parameters
|
1264
|
-
# @return [
|
1265
|
-
def
|
1266
|
-
|
1267
|
-
return
|
1184
|
+
# @return [Array<News>]
|
1185
|
+
def list_news_0(id_or_name, opts = {})
|
1186
|
+
data, _status_code, _headers = list_news_0_with_http_info(id_or_name, opts)
|
1187
|
+
return data
|
1268
1188
|
end
|
1269
1189
|
|
1270
1190
|
#
|
1271
|
-
#
|
1191
|
+
# Get news list of spscified project.
|
1272
1192
|
# @param id_or_name numeric project id or project name
|
1273
|
-
# @param package_id
|
1274
|
-
# @param release_id
|
1275
|
-
# @param file_id
|
1276
1193
|
# @param [Hash] opts the optional parameters
|
1277
|
-
# @return [Array<(
|
1278
|
-
def
|
1194
|
+
# @return [Array<(Array<News>, Fixnum, Hash)>] Array<News> data, response status code and response headers
|
1195
|
+
def list_news_0_with_http_info(id_or_name, opts = {})
|
1279
1196
|
if @api_client.config.debugging
|
1280
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1197
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.list_news_0 ..."
|
1281
1198
|
end
|
1282
|
-
|
1283
1199
|
# verify the required parameter 'id_or_name' is set
|
1284
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1285
|
-
|
1286
|
-
# verify the required parameter 'package_id' is set
|
1287
|
-
fail "Missing the required parameter 'package_id' when calling delete_release_file" if package_id.nil?
|
1288
|
-
|
1289
|
-
# verify the required parameter 'release_id' is set
|
1290
|
-
fail "Missing the required parameter 'release_id' when calling delete_release_file" if release_id.nil?
|
1291
|
-
|
1292
|
-
# verify the required parameter 'file_id' is set
|
1293
|
-
fail "Missing the required parameter 'file_id' when calling delete_release_file" if file_id.nil?
|
1294
|
-
|
1200
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.list_news_0" if id_or_name.nil?
|
1295
1201
|
# resource path
|
1296
|
-
|
1202
|
+
local_var_path = "/project/{id_or_name}/news".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
1297
1203
|
|
1298
1204
|
# query parameters
|
1299
1205
|
query_params = {}
|
@@ -1302,75 +1208,55 @@ module OSDNClient
|
|
1302
1208
|
header_params = {}
|
1303
1209
|
|
1304
1210
|
# HTTP header 'Accept' (if needed)
|
1305
|
-
|
1306
|
-
|
1211
|
+
local_header_accept = []
|
1212
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1307
1213
|
|
1308
1214
|
# HTTP header 'Content-Type'
|
1309
|
-
|
1310
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1215
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1216
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1311
1217
|
|
1312
1218
|
# form parameters
|
1313
1219
|
form_params = {}
|
1314
1220
|
|
1315
1221
|
# http body (model)
|
1316
1222
|
post_body = nil
|
1317
|
-
|
1318
|
-
|
1319
|
-
auth_names = ['oauth2-implicit']
|
1320
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
1223
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1224
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1321
1225
|
:header_params => header_params,
|
1322
1226
|
:query_params => query_params,
|
1323
1227
|
:form_params => form_params,
|
1324
1228
|
:body => post_body,
|
1325
|
-
:auth_names => auth_names
|
1229
|
+
:auth_names => auth_names,
|
1230
|
+
:return_type => 'Array<News>')
|
1326
1231
|
if @api_client.config.debugging
|
1327
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1232
|
+
@api_client.config.logger.debug "API called: ProjectApi#list_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1328
1233
|
end
|
1329
1234
|
return data, status_code, headers
|
1330
1235
|
end
|
1331
1236
|
|
1332
1237
|
#
|
1333
|
-
#
|
1238
|
+
# Get package list of specified project.
|
1334
1239
|
# @param id_or_name numeric project id or project name
|
1335
|
-
# @param package_id
|
1336
|
-
# @param release_id
|
1337
|
-
# @param file_id
|
1338
1240
|
# @param [Hash] opts the optional parameters
|
1339
|
-
# @
|
1340
|
-
|
1341
|
-
|
1342
|
-
data, status_code, headers = update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
|
1241
|
+
# @return [Array<Package>]
|
1242
|
+
def list_packages(id_or_name, opts = {})
|
1243
|
+
data, _status_code, _headers = list_packages_with_http_info(id_or_name, opts)
|
1343
1244
|
return data
|
1344
1245
|
end
|
1345
1246
|
|
1346
1247
|
#
|
1347
|
-
#
|
1248
|
+
# Get package list of specified project.
|
1348
1249
|
# @param id_or_name numeric project id or project name
|
1349
|
-
# @param package_id
|
1350
|
-
# @param release_id
|
1351
|
-
# @param file_id
|
1352
1250
|
# @param [Hash] opts the optional parameters
|
1353
|
-
# @
|
1354
|
-
|
1355
|
-
def update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
|
1251
|
+
# @return [Array<(Array<Package>, Fixnum, Hash)>] Array<Package> data, response status code and response headers
|
1252
|
+
def list_packages_with_http_info(id_or_name, opts = {})
|
1356
1253
|
if @api_client.config.debugging
|
1357
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1254
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.list_packages ..."
|
1358
1255
|
end
|
1359
|
-
|
1360
1256
|
# verify the required parameter 'id_or_name' is set
|
1361
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1362
|
-
|
1363
|
-
# verify the required parameter 'package_id' is set
|
1364
|
-
fail "Missing the required parameter 'package_id' when calling update_release_file" if package_id.nil?
|
1365
|
-
|
1366
|
-
# verify the required parameter 'release_id' is set
|
1367
|
-
fail "Missing the required parameter 'release_id' when calling update_release_file" if release_id.nil?
|
1368
|
-
|
1369
|
-
# verify the required parameter 'file_id' is set
|
1370
|
-
fail "Missing the required parameter 'file_id' when calling update_release_file" if file_id.nil?
|
1371
|
-
|
1257
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.list_packages" if id_or_name.nil?
|
1372
1258
|
# resource path
|
1373
|
-
|
1259
|
+
local_var_path = "/project/{id_or_name}/frs".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
1374
1260
|
|
1375
1261
|
# query parameters
|
1376
1262
|
query_params = {}
|
@@ -1379,60 +1265,59 @@ module OSDNClient
|
|
1379
1265
|
header_params = {}
|
1380
1266
|
|
1381
1267
|
# HTTP header 'Accept' (if needed)
|
1382
|
-
|
1383
|
-
|
1268
|
+
local_header_accept = []
|
1269
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1384
1270
|
|
1385
1271
|
# HTTP header 'Content-Type'
|
1386
|
-
|
1387
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1272
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1273
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1388
1274
|
|
1389
1275
|
# form parameters
|
1390
1276
|
form_params = {}
|
1391
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
1392
1277
|
|
1393
1278
|
# http body (model)
|
1394
1279
|
post_body = nil
|
1395
|
-
|
1396
|
-
|
1397
|
-
auth_names = ['oauth2-implicit']
|
1398
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
1280
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1399
1282
|
:header_params => header_params,
|
1400
1283
|
:query_params => query_params,
|
1401
1284
|
:form_params => form_params,
|
1402
1285
|
:body => post_body,
|
1403
1286
|
:auth_names => auth_names,
|
1404
|
-
:return_type => '
|
1287
|
+
:return_type => 'Array<Package>')
|
1405
1288
|
if @api_client.config.debugging
|
1406
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1289
|
+
@api_client.config.logger.debug "API called: ProjectApi#list_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1407
1290
|
end
|
1408
1291
|
return data, status_code, headers
|
1409
1292
|
end
|
1410
1293
|
|
1411
1294
|
#
|
1412
|
-
#
|
1413
|
-
# @param
|
1295
|
+
#
|
1296
|
+
# @param news_id
|
1414
1297
|
# @param [Hash] opts the optional parameters
|
1415
|
-
# @
|
1416
|
-
|
1417
|
-
|
1298
|
+
# @option opts [String] :title news title
|
1299
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
1300
|
+
# @return [News]
|
1301
|
+
def update_news(news_id, opts = {})
|
1302
|
+
data, _status_code, _headers = update_news_with_http_info(news_id, opts)
|
1418
1303
|
return data
|
1419
1304
|
end
|
1420
1305
|
|
1421
1306
|
#
|
1422
|
-
#
|
1423
|
-
# @param
|
1307
|
+
#
|
1308
|
+
# @param news_id
|
1424
1309
|
# @param [Hash] opts the optional parameters
|
1425
|
-
# @
|
1426
|
-
|
1310
|
+
# @option opts [String] :title news title
|
1311
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
1312
|
+
# @return [Array<(News, Fixnum, Hash)>] News data, response status code and response headers
|
1313
|
+
def update_news_with_http_info(news_id, opts = {})
|
1427
1314
|
if @api_client.config.debugging
|
1428
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1315
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.update_news ..."
|
1429
1316
|
end
|
1430
|
-
|
1431
|
-
|
1432
|
-
fail "Missing the required parameter 'id_or_name' when calling list_news_0" if id_or_name.nil?
|
1433
|
-
|
1317
|
+
# verify the required parameter 'news_id' is set
|
1318
|
+
fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.update_news" if news_id.nil?
|
1434
1319
|
# resource path
|
1435
|
-
|
1320
|
+
local_var_path = "/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_id.to_s)
|
1436
1321
|
|
1437
1322
|
# query parameters
|
1438
1323
|
query_params = {}
|
@@ -1441,69 +1326,65 @@ module OSDNClient
|
|
1441
1326
|
header_params = {}
|
1442
1327
|
|
1443
1328
|
# HTTP header 'Accept' (if needed)
|
1444
|
-
|
1445
|
-
|
1329
|
+
local_header_accept = []
|
1330
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1446
1331
|
|
1447
1332
|
# HTTP header 'Content-Type'
|
1448
|
-
|
1449
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1333
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1334
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1450
1335
|
|
1451
1336
|
# form parameters
|
1452
1337
|
form_params = {}
|
1338
|
+
form_params["title"] = opts[:'title'] if !opts[:'title'].nil?
|
1339
|
+
form_params["body"] = opts[:'body'] if !opts[:'body'].nil?
|
1453
1340
|
|
1454
1341
|
# http body (model)
|
1455
1342
|
post_body = nil
|
1456
|
-
|
1457
|
-
|
1458
|
-
auth_names = ['oauth2-implicit']
|
1459
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
1343
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1344
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1460
1345
|
:header_params => header_params,
|
1461
1346
|
:query_params => query_params,
|
1462
1347
|
:form_params => form_params,
|
1463
1348
|
:body => post_body,
|
1464
1349
|
:auth_names => auth_names,
|
1465
|
-
:return_type => '
|
1350
|
+
:return_type => 'News')
|
1466
1351
|
if @api_client.config.debugging
|
1467
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1352
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1468
1353
|
end
|
1469
1354
|
return data, status_code, headers
|
1470
1355
|
end
|
1471
1356
|
|
1472
1357
|
#
|
1473
1358
|
#
|
1359
|
+
# @param news_id
|
1474
1360
|
# @param id_or_name numeric project id or project name
|
1475
|
-
# @param title news title
|
1476
|
-
# @param body news body in OSDN Wiki format.
|
1477
1361
|
# @param [Hash] opts the optional parameters
|
1478
|
-
# @
|
1479
|
-
|
1480
|
-
|
1362
|
+
# @option opts [String] :title news title
|
1363
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
1364
|
+
# @return [News]
|
1365
|
+
def update_news_0(news_id, id_or_name, opts = {})
|
1366
|
+
data, _status_code, _headers = update_news_0_with_http_info(news_id, id_or_name, opts)
|
1481
1367
|
return data
|
1482
1368
|
end
|
1483
1369
|
|
1484
1370
|
#
|
1485
1371
|
#
|
1372
|
+
# @param news_id
|
1486
1373
|
# @param id_or_name numeric project id or project name
|
1487
|
-
# @param title news title
|
1488
|
-
# @param body news body in OSDN Wiki format.
|
1489
1374
|
# @param [Hash] opts the optional parameters
|
1490
|
-
# @
|
1491
|
-
|
1375
|
+
# @option opts [String] :title news title
|
1376
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
1377
|
+
# @return [Array<(News, Fixnum, Hash)>] News data, response status code and response headers
|
1378
|
+
def update_news_0_with_http_info(news_id, id_or_name, opts = {})
|
1492
1379
|
if @api_client.config.debugging
|
1493
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1380
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.update_news_0 ..."
|
1494
1381
|
end
|
1495
|
-
|
1382
|
+
# verify the required parameter 'news_id' is set
|
1383
|
+
fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.update_news_0" if news_id.nil?
|
1496
1384
|
# verify the required parameter 'id_or_name' is set
|
1497
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1498
|
-
|
1499
|
-
# verify the required parameter 'title' is set
|
1500
|
-
fail "Missing the required parameter 'title' when calling create_news_0" if title.nil?
|
1501
|
-
|
1502
|
-
# verify the required parameter 'body' is set
|
1503
|
-
fail "Missing the required parameter 'body' when calling create_news_0" if body.nil?
|
1504
|
-
|
1385
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.update_news_0" if id_or_name.nil?
|
1505
1386
|
# resource path
|
1506
|
-
|
1387
|
+
local_var_path = "/project/{id_or_name}/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_id.to_s).sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
1507
1388
|
|
1508
1389
|
# query parameters
|
1509
1390
|
query_params = {}
|
@@ -1512,66 +1393,65 @@ module OSDNClient
|
|
1512
1393
|
header_params = {}
|
1513
1394
|
|
1514
1395
|
# HTTP header 'Accept' (if needed)
|
1515
|
-
|
1516
|
-
|
1396
|
+
local_header_accept = []
|
1397
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1517
1398
|
|
1518
1399
|
# HTTP header 'Content-Type'
|
1519
|
-
|
1520
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1400
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1401
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1521
1402
|
|
1522
1403
|
# form parameters
|
1523
1404
|
form_params = {}
|
1524
|
-
form_params["title"] = title
|
1525
|
-
form_params["body"] = body
|
1405
|
+
form_params["title"] = opts[:'title'] if !opts[:'title'].nil?
|
1406
|
+
form_params["body"] = opts[:'body'] if !opts[:'body'].nil?
|
1526
1407
|
|
1527
1408
|
# http body (model)
|
1528
1409
|
post_body = nil
|
1529
|
-
|
1530
|
-
|
1531
|
-
auth_names = ['oauth2-implicit']
|
1532
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
1410
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1411
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1533
1412
|
:header_params => header_params,
|
1534
1413
|
:query_params => query_params,
|
1535
1414
|
:form_params => form_params,
|
1536
1415
|
:body => post_body,
|
1537
1416
|
:auth_names => auth_names,
|
1538
|
-
:return_type => '
|
1417
|
+
:return_type => 'News')
|
1539
1418
|
if @api_client.config.debugging
|
1540
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1419
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1541
1420
|
end
|
1542
1421
|
return data, status_code, headers
|
1543
1422
|
end
|
1544
1423
|
|
1545
1424
|
#
|
1546
|
-
#
|
1425
|
+
# Update tagret package.
|
1547
1426
|
# @param id_or_name numeric project id or project name
|
1548
|
-
# @param
|
1427
|
+
# @param package_id
|
1549
1428
|
# @param [Hash] opts the optional parameters
|
1550
|
-
# @
|
1551
|
-
|
1552
|
-
|
1429
|
+
# @option opts [String] :name package name
|
1430
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
1431
|
+
# @return [Package]
|
1432
|
+
def update_package(id_or_name, package_id, opts = {})
|
1433
|
+
data, _status_code, _headers = update_package_with_http_info(id_or_name, package_id, opts)
|
1553
1434
|
return data
|
1554
1435
|
end
|
1555
1436
|
|
1556
1437
|
#
|
1557
|
-
#
|
1438
|
+
# Update tagret package.
|
1558
1439
|
# @param id_or_name numeric project id or project name
|
1559
|
-
# @param
|
1440
|
+
# @param package_id
|
1560
1441
|
# @param [Hash] opts the optional parameters
|
1561
|
-
# @
|
1562
|
-
|
1442
|
+
# @option opts [String] :name package name
|
1443
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
1444
|
+
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
1445
|
+
def update_package_with_http_info(id_or_name, package_id, opts = {})
|
1563
1446
|
if @api_client.config.debugging
|
1564
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1447
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.update_package ..."
|
1565
1448
|
end
|
1566
|
-
|
1567
1449
|
# verify the required parameter 'id_or_name' is set
|
1568
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1569
|
-
|
1570
|
-
|
1571
|
-
fail "Missing the required parameter 'news_id' when calling get_news_0" if news_id.nil?
|
1572
|
-
|
1450
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.update_package" if id_or_name.nil?
|
1451
|
+
# verify the required parameter 'package_id' is set
|
1452
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.update_package" if package_id.nil?
|
1573
1453
|
# resource path
|
1574
|
-
|
1454
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
1575
1455
|
|
1576
1456
|
# query parameters
|
1577
1457
|
query_params = {}
|
@@ -1580,64 +1460,73 @@ module OSDNClient
|
|
1580
1460
|
header_params = {}
|
1581
1461
|
|
1582
1462
|
# HTTP header 'Accept' (if needed)
|
1583
|
-
|
1584
|
-
|
1463
|
+
local_header_accept = []
|
1464
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1585
1465
|
|
1586
1466
|
# HTTP header 'Content-Type'
|
1587
|
-
|
1588
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1467
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1468
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1589
1469
|
|
1590
1470
|
# form parameters
|
1591
1471
|
form_params = {}
|
1472
|
+
form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
|
1473
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
1592
1474
|
|
1593
1475
|
# http body (model)
|
1594
1476
|
post_body = nil
|
1595
|
-
|
1596
|
-
|
1597
|
-
auth_names = ['oauth2-implicit']
|
1598
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
1477
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1478
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1599
1479
|
:header_params => header_params,
|
1600
1480
|
:query_params => query_params,
|
1601
1481
|
:form_params => form_params,
|
1602
1482
|
:body => post_body,
|
1603
1483
|
:auth_names => auth_names,
|
1604
|
-
:return_type => '
|
1484
|
+
:return_type => 'Package')
|
1605
1485
|
if @api_client.config.debugging
|
1606
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1486
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1607
1487
|
end
|
1608
1488
|
return data, status_code, headers
|
1609
1489
|
end
|
1610
1490
|
|
1611
1491
|
#
|
1612
|
-
#
|
1492
|
+
# Update target release. (Note: If you update draft release, the release will be public automatically.)
|
1613
1493
|
# @param id_or_name numeric project id or project name
|
1614
|
-
# @param
|
1494
|
+
# @param package_id
|
1495
|
+
# @param release_id
|
1615
1496
|
# @param [Hash] opts the optional parameters
|
1616
|
-
# @
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1497
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
1498
|
+
# @option opts [String] :name Release name
|
1499
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
1500
|
+
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
1501
|
+
# @return [Release]
|
1502
|
+
def update_release(id_or_name, package_id, release_id, opts = {})
|
1503
|
+
data, _status_code, _headers = update_release_with_http_info(id_or_name, package_id, release_id, opts)
|
1504
|
+
return data
|
1620
1505
|
end
|
1621
1506
|
|
1622
1507
|
#
|
1623
|
-
#
|
1508
|
+
# Update target release. (Note: If you update draft release, the release will be public automatically.)
|
1624
1509
|
# @param id_or_name numeric project id or project name
|
1625
|
-
# @param
|
1510
|
+
# @param package_id
|
1511
|
+
# @param release_id
|
1626
1512
|
# @param [Hash] opts the optional parameters
|
1627
|
-
# @
|
1628
|
-
|
1513
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
1514
|
+
# @option opts [String] :name Release name
|
1515
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
1516
|
+
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
1517
|
+
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
1518
|
+
def update_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
1629
1519
|
if @api_client.config.debugging
|
1630
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1520
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.update_release ..."
|
1631
1521
|
end
|
1632
|
-
|
1633
1522
|
# verify the required parameter 'id_or_name' is set
|
1634
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1523
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.update_release" if id_or_name.nil?
|
1524
|
+
# verify the required parameter 'package_id' is set
|
1525
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.update_release" if package_id.nil?
|
1526
|
+
# verify the required parameter 'release_id' is set
|
1527
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.update_release" if release_id.nil?
|
1639
1528
|
# resource path
|
1640
|
-
|
1529
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
1641
1530
|
|
1642
1531
|
# query parameters
|
1643
1532
|
query_params = {}
|
@@ -1646,67 +1535,73 @@ module OSDNClient
|
|
1646
1535
|
header_params = {}
|
1647
1536
|
|
1648
1537
|
# HTTP header 'Accept' (if needed)
|
1649
|
-
|
1650
|
-
|
1538
|
+
local_header_accept = []
|
1539
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1651
1540
|
|
1652
1541
|
# HTTP header 'Content-Type'
|
1653
|
-
|
1654
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1542
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1543
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1655
1544
|
|
1656
1545
|
# form parameters
|
1657
1546
|
form_params = {}
|
1547
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
1548
|
+
form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
|
1549
|
+
form_params["time"] = opts[:'time'] if !opts[:'time'].nil?
|
1550
|
+
form_params["move_to_package_id"] = opts[:'move_to_package_id'] if !opts[:'move_to_package_id'].nil?
|
1658
1551
|
|
1659
1552
|
# http body (model)
|
1660
1553
|
post_body = nil
|
1661
|
-
|
1662
|
-
|
1663
|
-
auth_names = ['oauth2-implicit']
|
1664
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
1554
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1555
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1665
1556
|
:header_params => header_params,
|
1666
1557
|
:query_params => query_params,
|
1667
1558
|
:form_params => form_params,
|
1668
1559
|
:body => post_body,
|
1669
|
-
:auth_names => auth_names
|
1560
|
+
:auth_names => auth_names,
|
1561
|
+
:return_type => 'Release')
|
1670
1562
|
if @api_client.config.debugging
|
1671
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1563
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1672
1564
|
end
|
1673
1565
|
return data, status_code, headers
|
1674
1566
|
end
|
1675
1567
|
|
1676
1568
|
#
|
1677
|
-
#
|
1678
|
-
# @param news_id
|
1569
|
+
# Change visibility of target file.
|
1679
1570
|
# @param id_or_name numeric project id or project name
|
1571
|
+
# @param package_id
|
1572
|
+
# @param release_id
|
1573
|
+
# @param file_id
|
1680
1574
|
# @param [Hash] opts the optional parameters
|
1681
|
-
# @option opts [String] :
|
1682
|
-
# @
|
1683
|
-
|
1684
|
-
|
1685
|
-
data, status_code, headers = update_news_0_with_http_info(news_id, id_or_name, opts)
|
1575
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
1576
|
+
# @return [RelFile]
|
1577
|
+
def update_release_file(id_or_name, package_id, release_id, file_id, opts = {})
|
1578
|
+
data, _status_code, _headers = update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
|
1686
1579
|
return data
|
1687
1580
|
end
|
1688
1581
|
|
1689
1582
|
#
|
1690
|
-
#
|
1691
|
-
# @param news_id
|
1583
|
+
# Change visibility of target file.
|
1692
1584
|
# @param id_or_name numeric project id or project name
|
1585
|
+
# @param package_id
|
1586
|
+
# @param release_id
|
1587
|
+
# @param file_id
|
1693
1588
|
# @param [Hash] opts the optional parameters
|
1694
|
-
# @option opts [String] :
|
1695
|
-
# @
|
1696
|
-
|
1697
|
-
def update_news_0_with_http_info(news_id, id_or_name, opts = {})
|
1589
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
1590
|
+
# @return [Array<(RelFile, Fixnum, Hash)>] RelFile data, response status code and response headers
|
1591
|
+
def update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
|
1698
1592
|
if @api_client.config.debugging
|
1699
|
-
@api_client.config.logger.debug "Calling API: ProjectApi
|
1593
|
+
@api_client.config.logger.debug "Calling API: ProjectApi.update_release_file ..."
|
1700
1594
|
end
|
1701
|
-
|
1702
|
-
# verify the required parameter 'news_id' is set
|
1703
|
-
fail "Missing the required parameter 'news_id' when calling update_news_0" if news_id.nil?
|
1704
|
-
|
1705
1595
|
# verify the required parameter 'id_or_name' is set
|
1706
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
1707
|
-
|
1596
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.update_release_file" if id_or_name.nil?
|
1597
|
+
# verify the required parameter 'package_id' is set
|
1598
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectApi.update_release_file" if package_id.nil?
|
1599
|
+
# verify the required parameter 'release_id' is set
|
1600
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.update_release_file" if release_id.nil?
|
1601
|
+
# verify the required parameter 'file_id' is set
|
1602
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectApi.update_release_file" if file_id.nil?
|
1708
1603
|
# resource path
|
1709
|
-
|
1604
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}/{file_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s).sub('{' + 'file_id' + '}', file_id.to_s)
|
1710
1605
|
|
1711
1606
|
# query parameters
|
1712
1607
|
query_params = {}
|
@@ -1715,38 +1610,31 @@ module OSDNClient
|
|
1715
1610
|
header_params = {}
|
1716
1611
|
|
1717
1612
|
# HTTP header 'Accept' (if needed)
|
1718
|
-
|
1719
|
-
|
1613
|
+
local_header_accept = []
|
1614
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1720
1615
|
|
1721
1616
|
# HTTP header 'Content-Type'
|
1722
|
-
|
1723
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
1617
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
1618
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1724
1619
|
|
1725
1620
|
# form parameters
|
1726
1621
|
form_params = {}
|
1727
|
-
form_params["
|
1728
|
-
form_params["body"] = opts[:'body'] if opts[:'body']
|
1622
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
1729
1623
|
|
1730
1624
|
# http body (model)
|
1731
1625
|
post_body = nil
|
1732
|
-
|
1733
|
-
|
1734
|
-
auth_names = ['oauth2-implicit']
|
1735
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
1626
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
1627
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1736
1628
|
:header_params => header_params,
|
1737
1629
|
:query_params => query_params,
|
1738
1630
|
:form_params => form_params,
|
1739
1631
|
:body => post_body,
|
1740
1632
|
:auth_names => auth_names,
|
1741
|
-
:return_type => '
|
1633
|
+
:return_type => 'RelFile')
|
1742
1634
|
if @api_client.config.debugging
|
1743
|
-
@api_client.config.logger.debug "API called: ProjectApi#
|
1635
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1744
1636
|
end
|
1745
1637
|
return data, status_code, headers
|
1746
1638
|
end
|
1747
1639
|
end
|
1748
1640
|
end
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|