-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed fmt package in unnecessary places, left only User-Agent for G…
…ET requests and added Latin/Cyrillic check wherever possible because unexpected errors occurred
- Loading branch information
Showing
11 changed files
with
194 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
## Сссылки | ||
* [OAuth2](https://shikimori.one/oauth) | ||
|
||
## Базовая структура | ||
|
||
```golang | ||
package main | ||
|
||
import ( g "github.com/heycatch/goshikimori" ) | ||
|
||
/* | ||
ГАЙД ДЛЯ ЧАЙНИКОВ. | ||
ЕСЛИ ТЫ ЗНАЕШЬ С ЧЕМ РАБОТАЕШЬ, ТО НЕ ТРАТЬ СВОЕ ВРЕМЯ И | ||
ПЕРЕХОДИ СРАЗУ К ДОКУМЕНТАЦИИ. | ||
-------------------------- | ||
Для получения полей APPLICATION_NAME и PRIVATE_KEY | ||
перейди по ссылки вверху и создай приложение, | ||
либо присоединись к "Test Api" и используй его, дело твое. | ||
-------------------------- | ||
Для большинства запросов, например поиск | ||
аниме/манги/пользователей и тому подобного, | ||
поле APPLICATION_NAME будет достаточным, а | ||
PRIVATE_KEY можно оставить пустым. | ||
func config() *g.Configuration { | ||
return g.SetConfiguratuib( | ||
"MY_APPLICATION", | ||
"", | ||
) | ||
} | ||
-------------------------- | ||
Если нужно изменить какую-то информацию, а именно | ||
добавить друга, добавить в игнор или написать | ||
сообщение, то тогда обязательно поле PRIVATE_KEY. | ||
ВАЖНО: у твоего приложения, при регистрации, должны | ||
быть права доступа(что оно может делать от твоего имени) | ||
для тех или иных операций. | ||
func config() *g.Configuration { | ||
return g.SetConfiguratuib( | ||
"MY_APPLICATION", | ||
"MY_PRIVATE_KEY", | ||
) | ||
} | ||
*/ | ||
|
||
func config() *g.Configuration { | ||
return g.SetConfiguration( | ||
"APPLICATION_NAME", | ||
"PRIVATE_KEY", | ||
) | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## Links | ||
* [OAuth2](https://shikimori.one/oauth) | ||
|
||
## Basic structure | ||
|
||
```golang | ||
package main | ||
|
||
import ( g "github.com/heycatch/goshikimori" ) | ||
|
||
/* | ||
DUMMIES GUIDE. | ||
IF YOU KNOW WHAT YOU'RE WORKING WITH, DON'T WASTE YOUR TIME AND GO STRAIGHT TO THE DOCUMENTATION. | ||
-------------------------- | ||
To get the APPLICATION_NAME and PRIVATE_KEY fields | ||
go to the link above and create an application, | ||
or join "Test Api" and use it, it's up to you. | ||
-------------------------- | ||
For most queries, like searching | ||
anime/manga/users and the like, | ||
the APPLICATION_NAME field will suffice, and the | ||
PRIVATE_KEY can be left blank. | ||
func config() *g.Configuration { | ||
return g.SetConfiguratuib( | ||
"MY_APPLICATION", | ||
"", | ||
) | ||
} | ||
-------------------------- | ||
If you need to change some information, such as | ||
add a friend, add to ignore or write | ||
message, then the PRIVATE_KEY field is mandatory.. | ||
IMPORTANT: your application, when registering, must have | ||
have access rights (what it can do on your behalf) | ||
for certain operations. | ||
func config() *g.Configuration { | ||
return g.SetConfiguratuib( | ||
"MY_APPLICATION", | ||
"MY_PRIVATE_KEY", | ||
) | ||
} | ||
*/ | ||
|
||
func config() *g.Configuration { | ||
return g.SetConfiguration( | ||
"APPLICATION_NAME", | ||
"PRIVATE_KEY", | ||
) | ||
} | ||
``` |
Oops, something went wrong.