aga-telegram 0.0.1 → 0.0.2

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: 302ea3efce818df2799a297a822ac7352e10f6c09bb1334426c74826e7f60eab
4
- data.tar.gz: 426c3e6634e056083a2334d0e736efdbdd4949f0a691803dfe26c4ac88072f30
3
+ metadata.gz: 441939c8a3dc7f97957ddeb7acc5f7d68b01a471eaef3c698ba578c8c83a6b5a
4
+ data.tar.gz: 99250426a88a3d9589789aec2e2dcb830de3e6fc230772119870e1b889d58cac
5
5
  SHA512:
6
- metadata.gz: db2d32d90b9beb82c41bfae80c43045b3b92a15f3e07bd55ea582247c0ff47ac9d39683e54d0b2282654fbab8dadf68bf0b7508238a025b29ca7de50a0d33964
7
- data.tar.gz: abc0a03f057e75cc01b73610522b1166dabda4c658099daceec78275df0fa3994881a4d7899e95236b857456dbb06fc5d8bd7781ad9b7f021ab9187c4dd6a167
6
+ metadata.gz: 89c8a0991d2e5f2fe27496aa7aed20e852fe76764d0d8cd3fde7280e24f19ab7dfdd81907e063f44aa39a251dd2557b4e710aadee5c07073e0fa6d0806f823c6
7
+ data.tar.gz: 4152fc1572267d427251287ae8da469f5bf2fcc46b32e9d3dc6c24b4f638f3740d9ffc92e125a1cb61a3e6933edf93597f61d6d794c06906bb21bdc5c135934d
data/README.md CHANGED
@@ -1,29 +1,74 @@
1
- # Telegram
1
+ # Aga-telegram
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/telegram`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Aga request is a Ruby gem that provides a convenient way to make HTTP requests, including passing parameters, headers, and more. It simplifies the process of interacting with APIs and web services and handles the complexities of handling HTTP requests and responses.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ## Features
6
+
7
+ - Make GET, POST, PUT, DELETE, and other HTTP requests easily.
8
+ - Pass parameters and headers with the requests.
9
+ - Handle response parsing automatically, returning JSON responses.
10
+ - Get access to the response status, headers, and body.
6
11
 
7
12
  ## Installation
8
13
 
9
14
  Install the gem and add to the application's Gemfile by executing:
10
15
 
11
- $ bundle add telegram
16
+ $ bundle add aga-telegram
12
17
 
13
18
  If bundler is not being used to manage dependencies, install the gem by executing:
14
19
 
15
- $ gem install telegram
20
+ $ gem install aga-telegram
16
21
 
17
22
  ## Usage
18
23
 
19
- TODO: Write usage instructions here
24
+ To use Aga-telegram in your application, require the gem and start making requests. Here's a basic example:
25
+
26
+ ```
27
+ require 'telegram'
20
28
 
21
- ## Development
29
+ r = Request::Http.new
30
+ response = r.get('https://api.example.com/resource', { 'key' => 'value' }, { 'Authorization' => 'Bearer TOKEN' })
22
31
 
23
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
+ puts response[:status] # Output: true or false
33
+ puts response[:response] # Output: {"data": "example"}
24
34
 
25
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
35
+ ```
26
36
 
27
37
  ## Contributing
28
38
 
29
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/telegram.
39
+ Contributions to Aga-request are welcome! If you encounter any issues or have suggestions for improvements, please submit an issue on the repository. Pull requests are also encouraged.
40
+
41
+
42
+ ## Private License
43
+
44
+ Version 0.0.2, 01/06/2023
45
+
46
+ By obtaining a copy of this software and associated documentation files (the "Software"), you agree that the Software is proprietary to AIGreenAnt and is protected under intellectual property laws. This license grants you limited rights to use the Software solely for internal purposes within your organization.
47
+
48
+ 1. License Grant
49
+
50
+ 1.1 You are granted a non-exclusive, non-transferable license to use the Software for internal purposes only.
51
+
52
+ 1.2 You may not distribute, sublicense, sell, or transfer the Software to any third party without prior written permission from AIGreenAnt.
53
+
54
+ 2. Intellectual Property
55
+
56
+ 2.1 The Software and any associated intellectual property rights, including but not limited to copyrights, patents, trademarks, trade secrets, and any other proprietary rights, are and shall remain the exclusive property of AIGreenAnt.
57
+
58
+ 2.2 You may not remove, alter, or obscure any proprietary notices or labels on the Software.
59
+
60
+ 3. Limitation of Liability
61
+
62
+ 3.1 In no event shall AIGreenAnt be liable for any direct, indirect, incidental, special, or consequential damages arising out of the use or inability to use the Software, even if AIGreenAnt has been advised of the possibility of such damages.
63
+
64
+ 4. Termination
65
+
66
+ 4.1 This license is effective until terminated. AIGreenAnt may terminate this license at any time if you fail to comply with the terms and conditions of this agreement.
67
+
68
+ 4.2 Upon termination, you must immediately cease all use of the Software and destroy all copies in your possession or control.
69
+
70
+ 5. Governing Law
71
+
72
+ 5.1 This license shall be governed by and construed in accordance with the laws of Italy, without regard to its conflict of laws principles.
73
+
74
+ By using the Software, you acknowledge that you have read and understood this license agreement and agree to be bound by its terms and conditions.
@@ -3,13 +3,13 @@
3
3
  require('telegram/bot')
4
4
 
5
5
  module Telegram
6
- class Service
6
+ class Message
7
7
  def initialize(token:, chat:)
8
8
  @token = token
9
9
  @chat = chat
10
10
  end
11
11
 
12
- def send_message(text)
12
+ def send(text)
13
13
  return false if configuration?
14
14
 
15
15
  Telegram::Bot::Client.run(@token) do |bot|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telegram
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aga-telegram
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Baldazzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-24 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -161,7 +161,7 @@ files:
161
161
  - lib/telegram.rb
162
162
  - lib/telegram/autoloader.rb
163
163
  - lib/telegram/base.rb
164
- - lib/telegram/resources/service.rb
164
+ - lib/telegram/resources/message.rb
165
165
  - lib/telegram/version.rb
166
166
  homepage: https://github.com/Baldaz02/aga-telegram-ruby
167
167
  licenses:
@@ -185,5 +185,5 @@ requirements: []
185
185
  rubygems_version: 3.3.24
186
186
  signing_key:
187
187
  specification_version: 4
188
- summary: aga-telegram0.0.1
188
+ summary: aga-telegram0.0.2
189
189
  test_files: []