osuny_api 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa384d23e319961d074a82202f346b2d6dc652f98076c6fb2a07d60b913f00af
4
- data.tar.gz: 466248d32f23e6c958721981ef62e22dec07a56cd1024da3229a66274c150dd5
3
+ metadata.gz: 59f1b8d157560352eddae3b4b0789d18f1635e5744802a717374aba06ea0c728
4
+ data.tar.gz: e15e5b411ea1e5ba835972db77c489e4253c7871d87543c4be219eb4809c6f39
5
5
  SHA512:
6
- metadata.gz: 90966cd42594866d5bd2d6e8857db3d9b571e8ae66a998fcc79dd896e2179e07513eb9ddfa1cbe5e8159cddd01558e9988b2dfc791eb50002b53b4c2fdc73de8
7
- data.tar.gz: 4ee584ea2031804795ed23d7c8be4cc861b4187ddd14b8a20fa3ab87c5d7dfceaaddb9998b9250b75741690535f4acbff64576e2fa441ead0f76c88feb64d5eb
6
+ metadata.gz: 27ee12f06c28e81ec2896ade22829d1e844bc537cf230d75b00dfa37b8015721ef546554495eb79b96047cfc41c7059eb3aa8a6bf86cb78774d9847628ec71df
7
+ data.tar.gz: 757db895eec60bc3d015f3ef60fdafc865e07ea0f12601a31f2ee7cffea937d692429afb12f30c4d67f13e3f6458e9e178add7c9904be447f349642311db2a4b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- osuny_api (0.2.2)
4
+ osuny_api (0.2.3)
5
5
  httparty
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -16,14 +16,14 @@ If bundler is not being used to manage dependencies, install the gem by executin
16
16
  osuny = OsunyApi.new host: 'https://instance.osuny.org',
17
17
  token: 'real_token'
18
18
 
19
- migration_identifier = "identifiant-unique"
20
19
  post = {
20
+ migration_identifier: "identifiant-unique"
21
21
  title: 'Titre importé'
22
22
  }
23
23
  osuny.communication
24
24
  .website('real_website_id')
25
25
  .post
26
- .import(migration_identifier, post)
26
+ .import(post)
27
27
  ```
28
28
  ## License
29
29
 
@@ -0,0 +1,12 @@
1
+ module OsunyApi
2
+ class Communication::Website::Page < Resource
3
+
4
+ def path
5
+ 'pages/'
6
+ end
7
+
8
+ def import(page)
9
+ client.post "#{full_path}import", { page: page }
10
+ end
11
+ end
12
+ end
@@ -5,11 +5,8 @@ module OsunyApi
5
5
  'posts/'
6
6
  end
7
7
 
8
- def import(migration_identifier, data)
9
- client.post "#{full_path}import", {
10
- migration_identifier: migration_identifier,
11
- post: data
12
- }
8
+ def import(post)
9
+ client.post "#{full_path}import", { post: post }
13
10
  end
14
11
  end
15
12
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OsunyApi
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osuny_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Levy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-09-26 00:00:00.000000000 Z
12
+ date: 2023-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -42,6 +42,7 @@ files:
42
42
  - lib/osuny_api/client.rb
43
43
  - lib/osuny_api/communication.rb
44
44
  - lib/osuny_api/communication/website.rb
45
+ - lib/osuny_api/communication/website/page.rb
45
46
  - lib/osuny_api/communication/website/post.rb
46
47
  - lib/osuny_api/error.rb
47
48
  - lib/osuny_api/resource.rb
@@ -68,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
69
  - !ruby/object:Gem::Version
69
70
  version: '0'
70
71
  requirements: []
71
- rubygems_version: 3.4.13
72
+ rubygems_version: 3.4.6
72
73
  signing_key:
73
74
  specification_version: 4
74
75
  summary: Gem Ruby pour l'API Osuny