Kaynağa Gözat

Small optimization for photo rail request size

Zed 4 yıl önce
ebeveyn
işleme
e0b141daf9
2 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. 2 0
      src/apiutils.nim
  2. 0 3
      src/consts.nim

+ 2 - 0
src/apiutils.nim

@@ -17,6 +17,8 @@ proc genParams*(pars: openArray[(string, string)] = @[]; cursor="";
     result &= p
   if ext:
     result &= ("ext", "mediaStats")
+    result &= ("include_ext_alt_text", "true")
+    result &= ("include_ext_media_availability", "true")
   if count.len > 0:
     result &= ("count", count)
   if cursor.len > 0:

+ 0 - 3
src/consts.nim

@@ -35,16 +35,13 @@ const
     "cards_platform": "Web-12",
     "include_cards": "1",
     "include_composer_source": "false",
-    "include_ext_alt_text": "true",
     "include_reply_count": "1",
     "tweet_mode": "extended",
     "include_entities": "true",
     "include_user_entities": "true",
     "include_ext_media_color": "false",
-    "include_ext_media_availability": "true",
     "send_error_codes": "true",
     "simple_quoted_tweet": "true",
-    "ext": "mediaStats",
     "include_quote_count": "true"
   }.toSeq