Questions tagged [giphy-api]

Related to the use of the Giphy API. Consider also the tag [giphy] if your question isn't about the API.

70 questions
0
votes
1 answer

How do I fix "Declaration or statement expected. ts(1128)" in Discord.js?

I just started coding a Discord bot, and I'm having a problem with coding with Giphy API. I don't know if the entire code is wrong, but anyways I'm confused with it. How do I fix the problem? The first If-Then statement doesn't give out any errors,…
Raymond Hsu
  • 63
  • 10
0
votes
1 answer

Generating gifs based on a user input

I would like to generate gifs based on a user input. I can generate a single gif using the following code: ` def getGif(request): import time import giphy_client from giphy_client.rest import ApiException from pprint import pprint …
JBull
  • 43
  • 1
  • 6
0
votes
1 answer

HTTPS error on deployed React project

I was trying to host my React project on GH Pages. The deploy worked fine but when I try to search for gifs I get the following error http_browser.js:47 Mixed Content: The page at 'https://pimmesz.github.io/react-giphy/' was loaded over HTTPS, but…
Pimmesz
  • 425
  • 5
  • 22
0
votes
2 answers

Uploading .mp4 via HTTPS

I'm trying to upload an .mp4 file to Giphy.com's API. It says to send the file over as 'Binary' and I think I'm confused as what exactly they mean by that. Here's the docs if you scroll to the bottom at "Upload Endpoint".…
aweyeahdawg
  • 252
  • 4
  • 14
0
votes
1 answer

'addEventListener' of undefined

I am trying to make it so that when the user clicks one of the 30 teams, the team that is clicked is queried with the Giphy API. The giphy API key used is the public API key. // all 30 NBA Teams // var predefinedButtons = [ "Atlanta Hawks", …
pnoonan32
  • 1
  • 1
0
votes
0 answers

Write specific API data to JSON file

I want to be able to only save specific data from the output of the API... function getGiph() { giphy.search({ q: 'pratt', }, function (err, res) { var gif = res.data; for (var i = 0; i < gif.length; i++) { …
0
votes
0 answers

jQuery and Giphy - Set Background Image after downloading

I am randomly getting gifs from GIPHY and want to set them as the background image of my body. On click, a new random gif should be displayed. I've got this part working however, I want to wait until the whole gif is downloaded until setting the…
0
votes
1 answer

Javascript state change reverting

I have a simple jQuery app to display images from Giphy based on an ajax call, and toggle animate/stop them on mouseclick by toggling the src URL and data-state attributes. I'm also displaying a different set of images based on user input. I have…
geochanto
  • 842
  • 8
  • 37
0
votes
2 answers

Make gifs appear on a button click

I am trying to make a page that has an array of "topics". Each topic has a button, and when pressed, gifs about the topic appear on the page. The user can also enter their own topic to create a button and get more gifs. Im using the giphy API. I…
0
votes
2 answers

Need onclick to toggle between image and gif from giphy api call

::UPDATED CODE:: I have dynamically generated buttons from an array. When a button is clicked, 10 still images of gifs append to the page from an API call. When clicking on one of the dynamically generated still images, I need the animated gif to…
Whit W
  • 64
  • 10
0
votes
2 answers

My Javascript page is not getting data from giphy API

I have linked the Giphy API into my app and cannot seem to figure out why the call is not working. I thought perhaps it was my key but I inserted a public key and that still did not work. Am I calling the API incorrectly? I did check the…
lea Calderon
  • 11
  • 1
  • 1
  • 3
0
votes
1 answer

Giphy API: Setting New Source Attribute for Random GIFs with jQuery

I'm so close! and a bit confused...so tell me if I'm over-complicating things. I'm using the public Giphy API to pull up a random gif (tag=dog in example below) and want to cycle through new ones each time a button is clicked. In the example below,…
Ben Thompson
  • 37
  • 1
  • 5
0
votes
1 answer

Can't loop through Giphy API Array

I have a CodePen utilizing the GIPHY API that calls GIFs based off user input. It works except it only calls the first item in an array. I realize because this is calling the first item in an array. I tried replacing 0 with i and attempted a for…
user5854648
  • 849
  • 1
  • 9
  • 29
0
votes
1 answer

How do I display all Giphy API search result images?

My Giphy API call is successful but now I'm trying to get all of the images to display instead of just the first one. I'm sure there is a loop needed in here but I'm not sure how/when to make that happen. Please see below for my HTML & jQuery…
0
votes
1 answer

Javascript/API - Search result not showing

I'm new to working with API's. My problem: Looks like my code is incorrect somewhere. Searching isn't working. How can I get a specific search result that the user searches for? GitHub link to the Giphy API is here:…
spidey677
  • 235
  • 5
  • 22