Giter Site home page Giter Site logo

giphy4j's People

Contributors

ishchenko avatar keshrath avatar nnskalka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

giphy4j's Issues

java.lang.ClassNotFoundException: at/mukprojects/giphy4j/Giphy

java.lang.NoClassDefFoundError: at/mukprojects/giphy4j/Giphy at me.WattMann.listeners.GifCommand.onMessageReceived(GifCommand.java:21) at net.dv8tion.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:417) at net.dv8tion.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84) at net.dv8tion.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:122) at net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:37) at net.dv8tion.jda.core.requests.WebSocketClient.onDispatch(WebSocketClient.java:1051) at net.dv8tion.jda.core.requests.WebSocketClient.onEvent(WebSocketClient.java:911) at net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:890) at net.dv8tion.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:1089) at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:368) at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:270) at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:990) at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:749) at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45) Caused by: java.lang.ClassNotFoundException: at.mukprojects.giphy4j.Giphy at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 16 more

my code

getUrl()

might just be me but when using getUrl(), it doesnt return the exact url but GifData. e.g

SearchFeed [
  GifData [
    id = ulDKf3pH7wqfC
    slug = ulDKf3pH7wqfC
    url = https://giphy.com/gifs/ulDKf3pH7wqfC
    GifImage (Original) [
      url = https://media3.giphy.com/media/ulDKf3pH7wqfC/giphy.gif
      width = 216
      height = 288
      size = 374533
      frames = 30
      mp4 = https://media3.giphy.com/media/ulDKf3pH7wqfC/giphy.mp4
      mp4Size = 40500
      webp = https://media3.giphy.com/media/ulDKf3pH7wqfC/giphy.webp
      webpSize = 133728
    ]
  ]
  Meta [status = 200, msg = OK]
  Pagination [totalCount = 1370, count = 1, offset = 0]
]

downsize filter ?

Hi guys,

your lib is very convenient and easy to use : it does perfectly fit my needs ...at an exception : i didn't find how to query gifs with the downsize. I could not find sample code to do that :

SearchRandom giphyData = giphy.searchRandomS("Happy birthday");

In my case, i make a random search and want to be sure that the gif will be displayed. Iwas the downsized param, i guess it's the good one.
Sticketrs are nice and seem to be lighter but it seems like there are more funny gifs than stickers.

Could you share some code snippet on your README.md to show how to achieve this please ?

Thank you in advance for your help.

Kind Regards,

Adrien

GJSON Error

Sometimes, I get the following error:

ERROR at.mukprojects.giphy4j.Giphy - java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
	at com.google.gson.Gson.fromJson(Gson.java:887)
	at com.google.gson.Gson.fromJson(Gson.java:852)
	at com.google.gson.Gson.fromJson(Gson.java:801)
	at com.google.gson.Gson.fromJson(Gson.java:773)
	at at.mukprojects.giphy4j.Giphy.searchRandom(Giphy.java:258)
	at io.beekeeper.bots.giphy.GiphyChatBot.getRandomImageByTag(GiphyChatBot.java:59)
	at io.beekeeper.bots.giphy.GiphyChatBot.onNewMessage(GiphyChatBot.java:40)
	at io.beekeeper.sdk.ChatBot.handleMessage(ChatBot.java:44)
	at io.beekeeper.sdk.MessageListenerImpl.lambda$process$0(MessageListenerImpl.java:90)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data
	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
	... 16 more

I suspect an error result, which is not parsed correctly. Am I right?

It looks like there are some tags, which don't have gifs or something... That kills the package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.