Main Menu
Before posting, please read: When to use this forum, when to submit a help ticket

Request: Data API

Started by danray0424, March 03, 2021, 04:38:43 PM

Previous topic - Next topic

danray0424

I can think of all sorts of things I might build using BandHelper data if there were a data API I could use to get at my content.

I'd for SURE want to build a song request web app that derives its song list from the live contents of a BandHelper setlist or smart list. In the post-Covid world, I want touchless song selection for my live karaoke shows.

I'd like to make a song selection randomizer, kicked off by commands issued by viewers of my livestream.

I could imagine an advanced CRM that connects with and expands on the "contacts" section of BandHelper. Or interfaces BandHelper with Salesforce or something!

A data API is what I'd need to make all these things. In my day gig, I'm a Product Manager in the real estate space, and my main product is a data API platform for MLS data. So I know about data access, security, and the kind of modes of interaction that data consumers would want.

Work with me, Arlo! This would be so cool!!

arlo

Please see the last section on this page for a song feed:

http://www.bandhelper.com/tutorials/sharing_set_lists.html

And the last section on this page for an event feed:

http://www.bandhelper.com/tutorials/sharing_your_calendar.html

danray0424

#2
I had a feeling you were out ahead of me! You always are.

It looks like custom fields aren't included in the JSON output. Can that be added?

Also it'd be great if some details about the setlist or smartlist could be included, even if just the name. I see your structure here is just a long array, so perhaps this could be a new object type?

arlo

Custom fields should be included if you turn on the Public option on the custom field edit page. For events, you'll get the public custom fields for the first contact attached to the event. Am I ahead of you again?  ;D

For set lists and smart lists, the feed URL is specific to one set list or smart list, so you would know the name when you use the URL and can just display it. I think the only time that would be an issue is if you're regularly changing the names of the set lists and you need the current name to be reflected, but that seems unlikely. I think it's more likely you'd want to hard code a "public" name on your website and leave that consistent even if you change the "internal" name in BandHelper.

danray0424

#4
WAY ahead of me! Always!

Little bug report: My custom field "Year" is showing up in the feed with the field name "custom_qQXYPl". Same with the custom field I added to Schedule events.

What I'm digging into this weekend is basically a touchless request system for signups for my Live Acoustic Karaoke shows. Post-covid, I think people pawing through my physical books and song lists is probably a thing of the past. Plus I can let people "skip the line" by attaching a tip... There are health-positive and lucrative use cases here.

The MVP of this involves syncing down my Karaoke Songs smart list, rendering it so people can search and sort, then accept a signup request that I'll see on my phone. I'll just hard-code the URL of a specific smart list for that, so I have what I need to put that together.

A fuller-featured iteration might involve associating a particular set/smart list to particular gigs. I sometimes do "All 80's" or "Beatles Night" things, that have particular lists. Ideally I'd love a feed that is a list *of lists*, with the feed URL as a field.  I certainly could have an interface to populate manually with the available lists and their URLs, but automating that would be very slick.

And since it'll have a notion of "gigs", I'd like to expose upcoming dates on the public side, with details about the venue. I don't see the Category field in the Event, which I need to separate these sorts of gigs from other things. I do see the contact Address and custom fields, but not the Contact name. I'd also love to expose Phone.

EDIT: Know what, the other thing I realize as I build my database is, it'd be good to know your data types for the fields you expose on this feed, so I can be sure the table I set up can't be blown up or lose data if our types don't match. In API products, often there's a metadata document where this is defined--probably overkill for this interface, but the problem that solves certainly exists here.

arlo

Quote
My custom field "Year" is showing up in the feed with the field name "custom_qQXYPl". Same with the custom field I added to Schedule events.

It's probably best to keep using the ID here as opposed to using the name of the field. If we did that and you changed the (display) name of the field, you'd have to remember to update your feed parsing code to match.

Quote
A fuller-featured iteration might involve associating a particular set/smart list to particular gigs. I sometimes do "All 80's" or "Beatles Night" things, that have particular lists.

You can link a set list to an event, but you can't link a smart list to an event.

Quote
Ideally I'd love a feed that is a list *of lists*, with the feed URL as a field.

I can put that on my wish list. But I feel like you would need some way to filter the lists, not to show every list in your account, so there would need to be more functionality added around that. Maybe just a Public checkbox like on events.

Quote
I'd like to expose upcoming dates on the public side, with details about the venue. I don't see the Category field in the Event, which I need to separate these sorts of gigs from other things

You can use the Public checkbox on the event edit page.

Quote
I do see the contact Address and custom fields, but not the Contact name. I'd also love to expose Phone.

The primary function of the Events and Contacts modules are for your band's internal use. The contact name and phone are typically for the booker, so you wouldn't want to publish that. You can always add custom fields if you want to add more info specifically for public display.

Quote
it'd be good to know your data types for the fields you expose on this feed

I don't anticipate including anything but strings here. If that ever changed, I could address it at that time.

danray0424

Let's see if you're ahead of me on this too: Have you created a URL format for deep linking to a BH setlist (or even better, a song index in a setlist) from an external iOS application?

arlo

You can use bandhelper://set_list/abc123, replacing abc123 with the actual ID, which you can get from the URL of the set list edit details page on the website. This is used in SMS messages generated by the Send Update function on the edit page. Of course it requires that the recipient has the app installed, the account added and has access to the set list.

danray0424

Okay, I've got my chosen smartlist flowing into my local database, and I'm displaying my songs in a nice responsive web app (using the DataTables library).

As a reminder, use case here is touchless karaoke. I want people to choose their song, view the queue, and then come up and sing when it's their turn. My next user story is the signup/cancel workflow, and then the queue management tools the host will need.

Two new requests:

1. I'd love if we could get your internal song ID as a field. That way a change inside BH like a name spelling fix or something doesn't have to disrupt the relationships and historical data I'm generating locally. If the field values changed but I know I'm talking about the same song, I can update the song record and preserve those references I've created since the record left BH.

2. What would REALLY make this touchless is if I could pull down the lyrics for their chosen song for display in my app.  Their own device would replace having an iPad or something on their mic stand for them to spit germs on, and they could study the lyrics before they come up if they want. Any idea how that might be implementable?

arlo

To clarify, you would like to have the song ID and the lyrics included in the JSON feed? The song ID seems harmless, but the lyrics would increase the size and the opportunity for error of the feed by many times. I'd have to think about whether that's worth potentially creating problems for other users who don't need that.

danray0424

#10
Song ID, yes.

I was thinking lyrics could be a separate feed that just works one song at a time. I can pull that content down on the fly when the user requests it.

There certainly are third party lyrics APIs I could use for this, but sometimes I've customized things and may not follow exactly the same form as the original recording. So it'd be nice to be sure we're working off the same chart.

danray0424

#11
Any thoughts on this, Arlo?

Right now I'm de-duping songs on the Name field, which isn't ideal as it potentially leave orphans in my local db if a name is changed (spelling corrected or whatever) in BandHelper.

Love to know if you feel like a lyrics feed is in the offing, I need to decide pretty soon on how to implement that in the app.

If you're interested, check out http://liveacoustickaraoke.com to see what I've wrought. I'll be using it to drive an all-request Facebook livestream on Friday, its first time in the hands of the public. (It has a non-karaoke mode that changes some language from "sign up to sing" to just "request this song".)

arlo

I just added the song ID to the feed, but the lyrics will take more work and are on my wish list.

danray0424