Update: Using another way to authenticate github module (#2029)
The github module only authenticate by query string, and this method is deprecated: https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters There is no reason to remove it before the method stop working, so I've made possible to the user choose which authentication method he will use: * The parameter token remain unchanged. * If the parameter user is passed then the module will use the not deprecated method, passing user and token on the body of the requisition. Otherwise the module will use the deprecated method. Co-authored-by: Lucas <araujo.lucasvale@gmail.com> Fixes #2002
This commit is contained in:
parent
15e79b09d3
commit
15496bfb4a
4 changed files with 21 additions and 7 deletions
include/modules
|
@ -18,7 +18,6 @@ namespace modules {
|
|||
bool build(builder* builder, const string& tag) const;
|
||||
string get_format() const;
|
||||
|
||||
|
||||
private:
|
||||
void update_label(int);
|
||||
int get_number_of_notification();
|
||||
|
@ -30,11 +29,12 @@ namespace modules {
|
|||
label_t m_label{};
|
||||
label_t m_label_offline{};
|
||||
string m_api_url;
|
||||
string m_user;
|
||||
string m_accesstoken{};
|
||||
unique_ptr<http_downloader> m_http{};
|
||||
bool m_empty_notifications{false};
|
||||
std::atomic<bool> m_offline{false};
|
||||
};
|
||||
}
|
||||
} // namespace modules
|
||||
|
||||
POLYBAR_NS_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue