You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-24Lines changed: 40 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,9 @@ Or install it yourself as:
31
31
32
32
## Usage
33
33
34
-
### create instance
34
+
### Create instance
35
35
36
-
#### username/email and password
36
+
#### Username/email and password
37
37
38
38
```ruby
39
39
client =ZammadAPI::Client.new(
@@ -43,7 +43,7 @@ client = ZammadAPI::Client.new(
43
43
)
44
44
```
45
45
46
-
#### access token
46
+
#### Access token
47
47
48
48
```ruby
49
49
client =ZammadAPI::Client.new(
@@ -65,9 +65,9 @@ client = ZammadAPI::Client.new(
65
65
66
66
Individual resources can be created, modified, saved, and destroyed.
67
67
68
-
### create object
68
+
### Create object
69
69
70
-
with new and save
70
+
With new and save:
71
71
```ruby
72
72
group = client.group.new(
73
73
name:'Support',
@@ -79,7 +79,7 @@ group.id # id of record
79
79
group.name # 'Support'
80
80
```
81
81
82
-
with create
82
+
With create:
83
83
```ruby
84
84
group = client.group.create(
85
85
name:'Support',
@@ -90,21 +90,21 @@ group.id # id of record
90
90
group.name # 'Support'
91
91
```
92
92
93
-
### fetch object
93
+
### Fetch object
94
94
95
95
```ruby
96
96
group = client.group.find(123)
97
97
puts group.inspect
98
98
```
99
-
### update object
99
+
### Update object
100
100
101
101
```ruby
102
102
group = client.group.find(123)
103
103
group.name ='Support 2'
104
104
group.save
105
105
```
106
106
107
-
### destroy object
107
+
### Destroy object
108
108
109
109
```ruby
110
110
group = client.group.find(123)
@@ -115,7 +115,7 @@ group.destroy
115
115
116
116
A list of individual resources.
117
117
118
-
### all
118
+
### All
119
119
120
120
```ruby
121
121
groups = client.group.all
@@ -129,7 +129,7 @@ groups.each {|group|
129
129
}
130
130
```
131
131
132
-
### search
132
+
### Search
133
133
```ruby
134
134
groups = client.group.search(query:'some name')
135
135
@@ -142,7 +142,7 @@ groups.each {|group|
142
142
}
143
143
```
144
144
145
-
### all with pagination (beta)
145
+
### All with pagination (beta)
146
146
147
147
```ruby
148
148
groups = client.group.all
@@ -162,7 +162,7 @@ groups.page(2,3) {|group|
162
162
}
163
163
```
164
164
165
-
### search with pagination (beta)
165
+
### Search with pagination (beta)
166
166
```ruby
167
167
groups = client.group.search(query:'some name')
168
168
@@ -181,7 +181,7 @@ groups.page(2,3) {|group|
181
181
}
182
182
```
183
183
184
-
## perform actions on behalf of other user
184
+
## Perform actions on behalf of another user
185
185
186
186
As described in the [Zammad API documentation](https://docs.zammad.org/en/latest/api-intro.html#example-curl-request-on-behalf-of-a-different-user) it is possible to perfom actions on behalf other users. To use this feature you can set the attribute of the client accordingly:
zammad_api 1.0.7 built to pkg/zammad_api-1.0.7.gem.
372
+
```
373
+
5. Release
374
+
```
375
+
> rake release
376
+
zammad_api 1.0.7 built to pkg/zammad_api-1.0.7.gem.
377
+
Tag v1.0.7 has already been created.
378
+
Pushing gem to https://rubygems.org...
379
+
You have enabled multi-factor authentication. Please enter OTP code.
380
+
Code: ......
381
+
Successfully registered gem: zammad_api (1.0.7)
382
+
Pushed zammad_api 1.0.7 to https://rubygems.org
383
+
368
384
```
369
385
370
386
## Contributing
371
387
372
-
Bug reports and pull requests are welcome on GitHub at https://github.com/zammad/zammad-api-client-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
388
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/zammad/zammad-api-client-ruby). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
0 commit comments