1
0
Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

painor 5 жил өмнө
parent
commit
8b0ab5a9f0
2 өөрчлөгдсөн 43 нэмэгдсэн , 0 устгасан
  1. 21 0
      LICENSE
  2. 22 0
      README.md

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 GramJS
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 22 - 0
README.md

@@ -0,0 +1,22 @@
+# GramJS
+**GramJS** is Telegram client implementation in Javascript. This project's _core_ is **completely based** on
+[Telethon](https://github.com/LonamiWebs/Telethon). All the files which are fully based on it.
+don't forget to have a look to the original project.
+
+### Obtaining your `API ID` and `Hash`
+1. Follow [this link](https://my.telegram.org) and login with your phone number.
+2. Click under `API Development tools`.
+3. A `Create new application` window will appear. Fill in your application details.
+There is no need to enter any `URL`, and only the first two fields (`App title` and `Short name`)
+can be changed later as long as I'm aware.
+4. Click on `Create application` at the end. Now that you have the `API ID` and `Hash`,
+head to `api/` directory and create a copy of the `settings_example` file, naming it `settings` (lowercase!).
+Then fill the file with the corresponding values (your `api_id`, `api_hash` and phone number in international format).
+
+## Running GramJS
+First of all, you need to run the `index.js` by issuing `node index.js gen`. This will generate all the
+TLObjects from the given `scheme.tl` file. When it's done, you can run `node examples/main.js` to start the interactive example.
+
+## Using raw api
+Currently you can use any raw api function using `await client.invoke(new RequestClass(args))` .
+you can find all the requests and types at https://gram.js.org/