Quote:
Originally Posted by Fred - Nexturbate
Can you tell me what is the advantage of using API version 2? Because version 1 is quite functional, and there is no such "problem" with ip.
Thank you
|
First of all the disclaimer: I am NOT an employee of Chaturbate, I am an affiliate just like the rest of you.
I do not know what advantages Chaturbate intended on v2 versus v1.
I can tell you the advantages I see, but it will be totally from my perspective.
V1 was never really (imho) intended to be pulled on every hit. It returns all cams every time you call it. Each time it is called you have to process through the entire set of cams to do the various things you want to do.
V2 allows several passins that limit the return set.
limit= controls the number of records coming back
offset= controls where in the return set to start
exhibitionist= I am not sure what that will do, have not explored it yet,
gender= allows you to select a single gender or all genders
region= allows you to return cams for just a certain region
tag= returns records for certain tags
hd= returns records for hd cams
Then there is the client_ip parameter. This allows Chaturbate to filter based on a performers setting whether the cam should appear in the set based on the users country or locality. Version 1 has a field for countries allowed but it has always been empty. If it was filled it would have been up to you to do a lookup by ip to see if the user on your site should see the cam or not. This should eliminate some of the issues of putting a cam up and when you click it coming back saying that you are not allowed to see it.
These new parameters allow you to more finitely control the return set. It also allows the api to be much more efficient in that it does not have to be returning as many records and you don't have to handle as many records. So, with V2 you can realistically call it on every hit and still have a fast site.
There are disadvantages too. With Version 2 it is harder to do certain things. For example, I have several sites that are based off the age of the model (18yearoldcams, 1821camgirls, milffoxes(coming)). To do those with V2, using it the way it is intended, would be a major pain in the ass as there is no pass in to return just certain age cams. I would have to circumvent what Chaturbate wants to do and still use V2 like it was V1, pulling it into the database so that I could spit out just the cams I want.
I also like to do certain sorts. By age, location, etc. Doing these effectively with V2 would be another PITA. You would have to pull in all cams, sort them and then present the proper set. So again, I would probably be circumventing Chaturbate's intended use of V2 and instead use it as I use V1 and load it all to a database every 5 minutes.
Another disadvantage showed itself yesterday. While I was making this thread, the api slowed down for some reason. This made all my demos break basically. I don't have to worry about that on the sites I am loading using V1. On those I load a database. If the API does not return for me I just use the old set of cams until the API comes back. I am never without cams. That is not true if you are using V2 on every hit. On V2, you are basically presenting what is in the api return, no api return, no cams. I am sure there will be workarounds to handle that but using it as intended, there is not.
I think V1 will still has it's place and there are so many sites using it that I doubt that Chaturbate will be turning it off anytime soon. I have a note in Chaturbate right now asking if they have a planned end of life date on V1 as I use it all over the place.
That is my take on it for what it is worth and I guarantee that it is worth every cent you paid for it.
Edited in: I forgot to list what might be the biggest advantage although I did mention it in the OP. With V2 you can create a workable client side only solution. V1 did not really allow that because of the overhead involved in handling all the cams on every api call. Since you can limit the number of cams on V2 through the various passins you can create a client side solution that works. This moves a shitload of infrastructure and bandwidth off of your server and on to the client. This should result in lower costs and more efficient page delivery.
.