** Function name: GetJsonFromLauncherHub ** Description: Gets JSON from github server ***************************************************************************************/
| 582 | ** Description: Gets JSON from github server |
| 583 | ***************************************************************************************/ |
| 584 | String encodeQueryValue(const String &value) { |
| 585 | String encoded; |
| 586 | for (size_t i = 0; i < value.length(); ++i) { |
| 587 | char c = value[i]; |
| 588 | if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || |
| 589 | c == '_' || c == '.' || c == '~') { |
| 590 | encoded += c; |
| 591 | } else { |
| 592 | char hex[4]; |
| 593 | snprintf(hex, sizeof(hex), "%%%02X", static_cast<unsigned char>(c)); |
| 594 | encoded += hex; |
| 595 | } |
| 596 | } |
| 597 | return encoded; |
| 598 | } |
| 599 | |
| 600 | bool GetJsonFromLauncherHub(uint8_t page, String order, bool star, String query) { |
| 601 | String q = "&order_by=" + order; |
no outgoing calls
no test coverage detected