Przeglądaj źródła

switch to v5 endpoints

jblanked 11 miesięcy temu
rodzic
commit
78602bc9c3
2 zmienionych plików z 4 dodań i 4 usunięć
  1. 3 3
      callback/callback.c
  2. 1 1
      game/world.c

+ 3 - 3
callback/callback.c

@@ -745,7 +745,7 @@ static bool fetch_world_list(FlipperHTTP *fhttp)
         STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/world_list.json");
         STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/world_list.json");
 
 
     fhttp->save_received_data = true;
     fhttp->save_received_data = true;
-    return flipper_http_get_request_with_headers(fhttp, "https://www.flipsocial.net/api/world/v4/list/10/", "{\"Content-Type\":\"application/json\"}");
+    return flipper_http_get_request_with_headers(fhttp, "https://www.flipsocial.net/api/world/v5/list/10/", "{\"Content-Type\":\"application/json\"}");
 }
 }
 // we will load the palyer stats from the API and save them
 // we will load the palyer stats from the API and save them
 // in player_spawn game method, it will load the player stats that we saved
 // in player_spawn game method, it will load the player stats that we saved
@@ -994,7 +994,7 @@ static bool _fetch_game(DataLoaderModel *model)
 
 
         model->fhttp->save_received_data = true;
         model->fhttp->save_received_data = true;
         char url[128];
         char url[128];
-        snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v4/get/world/%s/", furi_string_get_cstr(first_world));
+        snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v5/get/world/%s/", furi_string_get_cstr(first_world));
         furi_string_free(world_list);
         furi_string_free(world_list);
         furi_string_free(first_world);
         furi_string_free(first_world);
         return flipper_http_get_request_with_headers(model->fhttp, url, "{\"Content-Type\":\"application/json\"}");
         return flipper_http_get_request_with_headers(model->fhttp, url, "{\"Content-Type\":\"application/json\"}");
@@ -1604,7 +1604,7 @@ static bool _fetch_worlds(DataLoaderModel *model)
         sizeof(model->fhttp->file_path),
         sizeof(model->fhttp->file_path),
         STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/world_list_full.json");
         STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/world_list_full.json");
     model->fhttp->save_received_data = true;
     model->fhttp->save_received_data = true;
-    return flipper_http_get_request_with_headers(model->fhttp, "https://www.flipsocial.net/api/world/v4/get/10/", "{\"Content-Type\":\"application/json\"}");
+    return flipper_http_get_request_with_headers(model->fhttp, "https://www.flipsocial.net/api/world/v5/get/10/", "{\"Content-Type\":\"application/json\"}");
 }
 }
 static char *_parse_worlds(DataLoaderModel *model)
 static char *_parse_worlds(DataLoaderModel *model)
 {
 {

+ 1 - 1
game/world.c

@@ -172,7 +172,7 @@ FuriString *fetch_world(const char *name)
     }
     }
 
 
     char url[256];
     char url[256];
-    snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v4/get/world/%s/", name);
+    snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v5/get/world/%s/", name);
     snprintf(fhttp->file_path, sizeof(fhttp->file_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/%s.json", name);
     snprintf(fhttp->file_path, sizeof(fhttp->file_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/%s.json", name);
     fhttp->save_received_data = true;
     fhttp->save_received_data = true;
     if (!flipper_http_get_request_with_headers(fhttp, url, "{\"Content-Type\": \"application/json\"}"))
     if (!flipper_http_get_request_with_headers(fhttp, url, "{\"Content-Type\": \"application/json\"}"))