Using Youtube Api to check if someone subscribed

Discussion in 'Plugin Development' started by Avery246813579, Oct 11, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Avery246813579

    Hello Bukkit!
    I have been looking into this and could not find a answer if it has been done before! Does anyone know if you can use the Youtube Api to go with a Minecraft plugin to see if someone subscribed to your channel.
    Thanks, Avery.
     
  2. Offline

    rbrick

    This might help.
     
  3. Offline

    Avery246813579

    rbrick I know how to use the api, I just don't know if they can connect.
     
  4. Avery246813579 So long as you can access it with Java, then you can. :)
     
  5. Offline

    Avery246813579

    AdamQpzm Not really. There are certain Java things that do not work in Minecraft plugins.
     
  6. Offline

    Watto

    Why not just give it a go, it wouldn't take long to find out! :p
     
  7. Offline

    Avery246813579

  8. Avery246813579 Fun fact: You actually can make a functioning GUI with a Bukkit plugin ;) It's just that a lot of users (those who don't have GUI access to their server's OS) wouldn't be able to see it. But it does work!

    rbrick Well yes, but if it has no way of displaying the GUI, then Java couldn't do it, so it's not something you can do in Java but not in a bukkit plugin ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 27, 2017
    rbrick, Rocoty and mythbusterma like this.
  9. Offline

    rbrick

    Avery246813579 Well, you can make GET and POST request and use OAuth2 authentication with in java. So yes, you can connect through Java...

    Well, technically the server would have to have a way of displaying the GUI, e.g X11 but yes if you can indeed have one ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  10. Offline

    mythbusterma

    Avery246813579

    The Bukkit plugins allow you to load arbitrary Java code, which, you can, in theory, use to run any Java code. That being said, many users won't be able to see a GUI, as Adam so aptly pointed out, however you can't open one on the client because there is no packet that a vanilla client recognizes as "GUI."
     
    AdamQpzm likes this.
  11. Offline

    GeorgeeeHD

    Do any of you guys know if there is a SubscribeEvent within the youtube api? (not to be confused with checking if someone is subscribed)
     
  12. Offline

    Regablith

    Like checking if someone subscribed at the moment?
     
  13. Offline

    GeorgeeeHD

    Regablith
    yup
    so like if it was setup the same way it was in Bukkit

    Code:java
    1. public void onSubscribe(UserSubscribeEvent e) {
    2.  
    3. String username = e.getWhoSubbed();
    4. String someString = e.getWhoSubbedTo();
    5.  
    6. }


    something like that.
     
  14. Offline

    Regablith

    I assume so :p
     
  15. Offline

    GeorgeeeHD

    Regablith
    well me too but i looked thru the notes on googles site and couldnt find it
     
  16. GeorgeeeHD They don't operate on an events system, so you'd have to periodically check yourself.
     
  17. Offline

    mythbusterma

    Regablith GeorgeeeHD

    Bukkit's event system is something that is completely unique to Bukkit. Why would YouTube use it?
     
  18. mythbusterma Well event-driven programs aren't unique to Bukkit, but I'll admit that Bukkit has its own events system. And an event system would be very unsuitable for YouTube.
     
  19. Offline

    mythbusterma

    AdamQpzm

    "Bukkit's event system is something that is completely unique to Bukkit," not "Event-based programming is something that is unique to Bukkit." I didn't say the latter, and I've used other event based systems before, but I was saying that Bukkit's is unique to Bukkit, and does not conform to any event standards.
     
  20. mythbusterma True, but others might take that to mean that there aren't event systems outside of Bukkit at all. Especially since there wasn't anyone really asking if they could have an event with Bukkit syntax, that was only done to demonstrate what it would look like if it was part of the Bukkit API.
     
    GeorgeeeHD likes this.
Thread Status:
Not open for further replies.

Share This Page