witnessmenow / arduino-youtube-api

A wrapper around the youtube api for arduino
MIT License
141 stars 48 forks source link

how can i use the subscriber number for custom alert (string) #43

Closed MagmaBeast closed 3 years ago

MagmaBeast commented 3 years ago

is the subscriber in form of a string , char or integer so i can use basic statement such as if(api.channelStats.subscriberCount = '2' ){ digitalWrite(2,HIGH);} else{ digitalWrite(2,LOW); }

joeybab3 commented 3 years ago

According to the source code it's a long: https://github.com/witnessmenow/arduino-youtube-api/blob/01ff0a667f64e5ae47456a2e90f98a31858eee5b/src/YoutubeApi.h#L43

witnessmenow commented 3 years ago

== 2 should work

On Wed 5 May 2021, 19:35 Joey Babcock, @.***> wrote:

According to the source code it's a long: https://github.com/witnessmenow/arduino-youtube-api/blob/01ff0a667f64e5ae47456a2e90f98a31858eee5b/src/YoutubeApi.h#L43

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/witnessmenow/arduino-youtube-api/issues/43#issuecomment-832917634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5PQVKUT3SJIKY33GBKHLTMGFX5ANCNFSM44EPCYSA .

MagmaBeast commented 3 years ago

Thank u it worked

Sent from my iPad

On 06-May-2021, at 12:12 AM, Brian Lough @.***> wrote:

 == 2 should work

On Wed 5 May 2021, 19:35 Joey Babcock, @.***> wrote:

According to the source code it's a long: https://github.com/witnessmenow/arduino-youtube-api/blob/01ff0a667f64e5ae47456a2e90f98a31858eee5b/src/YoutubeApi.h#L43

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/witnessmenow/arduino-youtube-api/issues/43#issuecomment-832917634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5PQVKUT3SJIKY33GBKHLTMGFX5ANCNFSM44EPCYSA .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MagmaBeast commented 3 years ago

can u suggest me a way so that everytime someone subscribes a buzzer buzzes for 10 seconds .thanks

joeybab3 commented 3 years ago

can u suggest me a way so that everytime someone subscribes a buzzer buzzes for 10 seconds .thanks

Store the old number, check every 60 seconds if the old number matches the new value, if not buzz for 10 seconds and store the new number.