How to get purchase_url from API - soundcloud

I added a buy link to one of my tracks and then tried to access it via API (Ruby wrapper). It displays always empty field.
Updating purchase_url is also not working, while other fields get updated.
Is this a bug or something wrong done on my side?

Can you post your URL? I'm able to retrieve this info fine from a REST console with a standard GET request.
Using this URL as an example:
https://soundcloud.com/maddecent/grandtheft-mobbin-feat
HTTP GET: https://api.soundcloud.com/resolve.json?url=https://soundcloud.com/maddecent/grandtheft-mobbin-feat&client_id=[client_id]
Returns:
{
"status": "302 - Found",
"location": "https://api.soundcloud.com/tracks/107686148.json?client_id=[client_id]"
}
Hitting the track endpoint:
HTTP GET: https://api.soundcloud.com/tracks/107686148.json?client_id=[client_id]
Returns:
{
"kind": "track",
"id": 107686148,
"created_at": "2013/08/28 17:24:39 +0000",
"user_id": 14730,
"duration": 186766,
"commentable": true,
"state": "finished",
"original_content_size": 9678964,
"last_modified": "2014/12/30 20:37:07 +0000",
"sharing": "public",
"tag_list": "Hedspin \"Mad Decent\" Jeffree's Dance Electronic Club Mobbin",
"permalink": "grandtheft-mobbin-feat",
"streamable": true,
"embeddable_by": "all",
"downloadable": false,
"purchase_url": "http://smarturl.it/GrandtheftMOB",
"label_id": null,
"purchase_title": "Buy on iTunes",
"genre": "",
"title": "Grandtheft - Mobbin feat. Hedspin",
"description": "Buy on iTunes: http://smarturl.it/GrandtheftMOB\r\nBuy on Beatport: http://bit.ly/GrandtheftBP\r\nBuy on Amazon: http://amzn.com/B00F4IFFQM\r\n\r\nRespected as one of the best live Canadian DJs in the game, Grandtheft has taken a break from globetrotting to pack in a HUGE release for Jeffree’s. Along with World Red Bull Thre3style champ and close pal Hedspin, they have made something minimal but fierce with their track “Mobbin.” The build channels the darkness of No Limit Records at its prime while the drop carries the bounce of a screwed and chopped new jack swing track. That, combined with the most menacing synth stab we’ve heard in a while, makes this tune unstoppable.\r\n\r\nWith “Give Me More,” Grandtheft lends us a soulful track that marries a delicious combination trap and dub in the same vein as his popular remix of Keys N Krates’ song “Treat Me Right” released off of Dim Mak. The juxtaposition of the drop is a total WTF moment for any club-goer and we mean that in the best way possible. Grandtheft’s momentum continues to pick up incredible speed with each release, and we don’t see his rise mellowing out anytime soon.\r\n\r\nGrandtheft\r\nSoundcloud: http://www.soundcloud.com/grandtheft\r\nFacebook: http://facebook.com/grandtheftmusic\r\nTwitter: https://twitter.com/grandtheft\r\nInstagram: http://instagram.com/itsgrandtheft\r\nYoutube: http://youtube.com/grandtheftofficial\r\n\r\nHedspin\r\nSoundcloud: https://soundcloud.com/hedspin\r\nFacebook: https://www.facebook.com/djhedspin\r\nTwitter: https://twitter.com/HEDSPIN\r\nInstagram: http://instagram.com/djhedspin",
"label_name": "Jeffree's",
"release": "JEFF060",
"track_type": "",
"key_signature": "",
"isrc": "US-Z4V-13-00221",
"video_url": null,
"bpm": null,
"release_year": 2013,
"release_month": 9,
"release_day": 17,
"original_format": "mp3",
"license": "all-rights-reserved",
"uri": "https://api.soundcloud.com/tracks/107686148",
"user": {
"id": 14730,
"kind": "user",
"permalink": "maddecent",
"username": "Mad Decent",
"last_modified": "2014/12/18 18:12:40 +0000",
"uri": "https://api.soundcloud.com/users/14730",
"permalink_url": "http://soundcloud.com/maddecent",
"avatar_url": "https://i1.sndcdn.com/avatars-000112599114-5etg3g-large.jpg"
},
"permalink_url": "http://soundcloud.com/maddecent/grandtheft-mobbin-feat",
"artwork_url": "https://i1.sndcdn.com/artworks-000056426845-b40tmr-large.jpg",
"waveform_url": "https://w1.sndcdn.com/JL8flUq6Vn0x_m.png",
"stream_url": "https://api.soundcloud.com/tracks/107686148/stream",
"playback_count": 770622,
"download_count": 16462,
"favoritings_count": 16626,
"comment_count": 489,
"attachments_uri": "https://api.soundcloud.com/tracks/107686148/attachments",
"policy": "MONETIZE"
}
Purchase info is in the JSON response:
"purchase_url": "http://smarturl.it/GrandtheftMOB",
"purchase_title": "Buy on iTunes",

Related

split mint money metaplex

I am new to blockchain technology and I have a certain issue with spliting into multiple wallet the mint money with metaplex
I want to know if it is possible to have some wallets that will get a percentage of the primary sale (mint) but will not get any royalties ?
And if it is possible how to do it ? (Json attribute in the metadata ? )
Here is my json metadata :
{
"name": "name",
"symbol": "symbol",
"description": "Collection of 2 NFTS on the blockchain. this is the number 1 out of 2.",
"seller_fee_basis_points": 500, // Here only public key 1 gets the royalties
"image": "1.png",
"attributes": [
{"trait_type:": "Background", "value": "Door"},
{"trait_type:": "Ninja", "value": "Red"}
],
"properties": {
"creators": [
{"address": "public key 1", "share": 50},
{"address": "public key 2", "share": 50}
],
"files": [{"uri": "1.png", "type": "image/png"}]
},
"collection": {"name": "Lavish Fighters", "family": "Rare"}
}
I do know we can't comment in Json it is just to make it more understandable
creators on the json field inside the metadata are deprecated on the newers standards. Also those creators are just for secondary markets royalty share.
You can take a look at Hydra its a wallet of wallets that work to split mint funds between different wallets. Here is a Hydra-UI that can work on mainnet.

Confused about how #id in structured data works

Basically, I'm trying to add BlogPosting, TechArticle and WebPage structured data types to my posts, but I'm getting errors in Google's structured data testing tool. They seem to be centred around when I link back to an Organization structured data type I've defined on my homepage, to save me having to repeat the same code across multiple pages.
Here's the structured data testing tool instance. Can anybody explain how I can properly link to the Organization data type (which is sitting on my homepage) in the author, creator and publisher properties?
https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fwww.lukeharrison.dev%2Farticles%2Fmike-brewer-motors-wins-best-online-experience-at-autotraders-2018-retailer-awards%2F
I feel as though it may be down to me not fully understanding the #id property, and how to properly can use it to link structured data together to reduce repetitive data.
Here's the code involved:
The BlogPosting
The linked Organisation
The errors I'm receiving
Example of BlogPosting
{
"#context": "http://schema.org",
"#type": "BlogPosting",
"about": "Great news! Mike Brewer Motors - a project I've been heavily involved in over the past few years - has won the 'Best Online Experience' at the Autotrader 2018 Retailer Awards.",
"articleSection": "Blog Posts",
"author": {
"id": "https://www.lukeharrison.dev#organization"
},
"copyrightHolder": {
"id": "https://www.lukeharrison.dev#person"
},
"copyrightYear": "2019",
"creator": {
"id": "https://www.lukeharrison.dev#organization"
},
"dateCreated": "2018-07-20",
"dateModified": "2018-07-20",
"datePublished": "2018-07-20",
"description": "Great news! Mike Brewer Motors - a project I've been heavily involved in over the past few years - has won the 'Best Online Experience' at the Autotrader 2018 Retailer Awards.",
"genre": "Web Design & Front-End Development",
"headline": "Mike Brewer Motors wins 'Best Online Experience' at Autotrader's 2018 Retailer Awards - Luke Harrison",
"image": {
"#type": "ImageObject",
"height": 512,
"url": "https://s.gravatar.com/avatar/c34b34964896ad0552a5b342ae08c1e2?s=512",
"width": 512
},
"inLanguage": "en-GB",
"isFamilyFriendly": "true",
"keywords": [
"news"
],
"mainEntityOfPage": "https://www.lukeharrison.dev/articles/mike-brewer-motors-wins-best-online-experience-at-autotraders-2018-retailer-awards",
"publisher": {
"id": "https://www.lukeharrison.dev#organization"
}
}
Example linked Organization, which sits on another page
{
"#context": "http://schema.org",
"#id": "https://www.lukeharrison.dev#organization",
"#type": "Organization",
"additionalType": [
"http://www.productontology.org/id/Web_design",
"http://www.productontology.org/doc/Search_engine_optimization",
"http://www.productontology.org/doc/Web_development"
],
"foundingDate": "2013",
"legalName": "Luke Harrison - UX / Web Developer",
"logo": "https://www.lukeharrison.dev/img/share-26bfb69f23.png",
"name": "Luke Harrison - UX / Web Developer",
"sameAs": [
"https://twitter.com/webdevluke?lang=en-gb",
"https://www.linkedin.com/in/lukedidit/",
"https://github.com/WebDevLuke",
"https://codepen.io/lukedidit/"
],
"url": "https://www.lukeharrison.dev"
}
The errors I'm receiving in my BlogPosting structure
author, creator and publisher:
The attribute publisher.itemtype has an invalid value.
A value for the name field is required.
The errors are about Google’s Article rich result (if you don’t want to get this rich result, you can ignore these errors).
For AMP pages, author and publisher are required properties. They require actual items as value, #id references are not supported. You can still provide the #id, but you need to specify the #type and the required properties in addition.

Why do "Sell Something" posts from a private group not contain a message field?

The results I get from the Facebook Graph API (all supported versions) on a private FB group differs from what I see when I go to the actual Facebook website. "Sell Something" posts from the private Group's /feed don't contain information such as the "message" property for some reason, even though I can see it on the website.
From Facebook.com:
Christine : Can't go anymore! Selling last minute
Front Orchestra tickets to the ...
Ingrid : For Sale: Portable booster seat high chair $20 — Pick up
at ...
From the Graph API:
[{
...
"message": "Can't go anymore! Selling last minute Front Orchestra tickets to the ...",
"privacy": {
"value": "",
"description": "",
"friends": "",
"allow": "",
"deny": ""
},
"type": "status",
"created_time": "2015-04-19T00:07:11+0000",
"updated_time": "2015-04-19T04:44:49+0000",
"is_hidden": false,
...
},
{
"privacy": {
"value": "",
"description": "",
"friends": "",
"allow": "",
"deny": ""
},
"type": "status",
"created_time": "2015-04-16T22:11:36+0000",
"updated_time": "2015-04-19T04:41:01+0000",
"is_hidden": false,
...
}]
You will notice that there is only a "message" field in the first post, and not in the second -- although, I don't see any reason that this should be happening.
Add an attachments attribute in fields path parameter. The URL will look like this:
/{group-id}/feed?fields=attachments
Then you'll have an object of type group_sell_product_item in the attachments array inside of each applicable post object. You can also have the post's photos.
I still wonder how to get the price info...

Get list of related tracks HTTP API SoundCloud

I wasn't able to find anything fitting in HTTP API documentation.
As I know, there's some tracks popping out in SC widget after current track is finished, therefore there is some related tracks functionality in SC itself, yet can we access it via API?
I.e get a list of tracks, related to given track's id.
Disclaimer: This is an undocumented endpoint and is subject to change at anytime by SoundCloud.
There is an undocumented endpoint that allows you to access a track's related sounds:
HTTP GET: https://api.soundcloud.com/tracks/[TRACK_ID]/related?client_id=[YOUR_CLIENT_ID]
You didn't specify a language, so i'm just going to give a high-level overview on how to use the endpoint.
First, get your track URL. I'll use this one as an example: https://soundcloud.com/msmrsounds/ms-mr-hurricane-chvrches-remix
Then hit the resolve endpoint to get the track_id.
HTTP GET: https://api.soundcloud.com/resolve.json?url=https%3A%2F%2Fsoundcloud.com%2Fmsmrsounds%2Fms-mr-hurricane-chvrches-remix&client_id=[YOUR_CLIENT_ID]
Response:
{
"status": "302 - Found",
"location": "https://api.soundcloud.com/tracks/90787841.json?client_id=[YOUR_CLIENT_ID]"
}
Next, hit the related endpoint with your track_id.
HTTP GET: https://api.soundcloud.com/tracks/90787841/related?client_id=[YOUR_ClIENT_ID]
The full response will give you up to 50 related tracks. The response is too large to post, but it's just an array of tracks.
[
{
"kind": "track",
"id": 112741336,
"created_at": "2013/09/27 09:40:29 +0000",
"user_id": 59817646,
"duration": 215896,
"commentable": true,
"state": "finished",
"original_content_size": 38068298,
"last_modified": "2015/04/04 20:17:24 +0000",
"sharing": "public",
"tag_list": "CHVRCHES Whitney Houston Zane Lowe",
"permalink": "chvrches-its-not-right-but-its",
"streamable": true,
"embeddable_by": "all",
"downloadable": false,
"purchase_url": null,
"label_id": null,
"purchase_title": null,
"genre": "Electronic",
"title": "CHVRCHES - It's Not Right But It's Okay (Whitney Houston Cover)",
"description": "CHVRCHES - It's Not Right But It's OK (Whitney Houston Cover) from Zane's Live Sessions",
"label_name": "",
"release": "",
"track_type": "recording",
"key_signature": "",
"isrc": "",
"video_url": null,
"bpm": null,
"release_year": null,
"release_month": null,
"release_day": null,
"original_format": "wav",
"license": "all-rights-reserved",
"uri": "https://api.soundcloud.com/tracks/112741336",
"user": {
"id": 59817646,
"kind": "user",
"permalink": "uknewmusic",
"username": "UKNewMusic",
"last_modified": "2013/09/27 09:38:04 +0000",
"uri": "https://api.soundcloud.com/users/59817646",
"permalink_url": "http://soundcloud.com/uknewmusic",
"avatar_url": "https://a1.sndcdn.com/images/default_avatar_large.png"
},
"permalink_url": "http://soundcloud.com/uknewmusic/chvrches-its-not-right-but-its",
"artwork_url": "https://i1.sndcdn.com/artworks-000058757165-6tnuep-large.jpg",
"waveform_url": "https://w1.sndcdn.com/XkEffI5hwjZ7_m.png",
"stream_url": "https://api.soundcloud.com/tracks/112741336/stream",
"playback_count": 680326,
"download_count": 0,
"favoritings_count": 9241,
"comment_count": 199,
"attachments_uri": "https://api.soundcloud.com/tracks/112741336/attachments",
"policy": "ALLOW"
},
{ ...
}
]

facebook, how to get more information concerning the likes?

i am grabbing the likes of my friends, but i also want to grab the links that are found in that likes.
When you like something the like on your wall will point to something, whatever u liked. I am talking about all those links.
edit:
the response i get right now looks something like:
{
"data": [
{
"name": "Seam Legging - Shooting Star",
"category": "Product/service",
"id": "114310318626160",
"created_time": "2011-06-15T22:26:18+0000"
},
{
"name": "Junior's 535\u2122 Legging - Seaport Blue",
"category": "Product/service",
"id": "146626898728947",
"created_time": "2011-06-15T22:26:17+0000"
},
{
"name": "Singer Needed For Pleasure Band CA Music Vocals Los Angeles, CA auditions Modeling Acting Auditions & Casting Calls ExploreTalent modeling audition america next top model",
"category": "Website",
"id": "122740287810745",
"created_time": "2011-06-15T19:06:13+0000"
},
{
"name": "Looking for singers R/B Britney type K P Music Vocals Los Angeles, CA auditions Modeling Acting Auditions & Casting Calls ExploreTalent extras acting extra",
"category": "Website",
"id": "130850386995940",
"created_time": "2011-06-15T19:06:12+0000"
},......
edit2:
i have been trying to use FQL. but i still dont get the links from inside likes:
her is my code so far
<?php
$facebook = new Facebook(array(
'appId' => $client_id,
'secret' => $client_secret,
'cookie' => true,
));
$session = $facebook->getSession();
$likelink = $facebook->api(array( 'method' => 'fql.query', 'query' => 'SELECT likes FROM stream WHERE source_id ='.$myself.'', ));
print_r($likelink);
?>
After retrieving the list of likes you have, you then need to go through them, get the ID and open up:
https://graph.facebook.com/ID
Which will give you more details regarding that specific item which you liked. For example for the first item in your data:
https://graph.facebook.com/114310318626160
{
"id": "114310318626160",
"name": "Seam Legging - Shooting Star",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/50281_114310318626160_1881220_s.jpg",
"link": "http://r.levi.com/product/index.jsp?productId=4068748",
"likes": 115,
"category": "Product/service",
"website": "http://r.levi.com/product/index.jsp?productId=4068748",
"description": "Buy Seam Legging - Shooting Star - Top-stitched seams at the leg give this super-skinny fit just the right amount of detail - and slims its look, too. Its four pockets keep it comfortable."
}
And from there, you can probably guess that the link is the actual link to the liked item. Do note that not all items liked are some websites, but they can be for example Facebook pages for example:
https://graph.facebook.com/108905269168364
{
"id": "108905269168364",
"name": "Conan O'Brien Presents: Team Coco",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/211060_108905269168364_696236_s.jpg",
"link": "http://www.facebook.com/teamcoco",
"likes": 1639441,
"category": "Tv show",
"website": "www.teamcoco.com\n",
"username": "teamcoco",
"description": "Welcome to the official Team Coco Facebook page! Yes, imagine for a moment, an alternate reality in which Conan O'Brien and his brethren can finally be experienced as they were always meant to be: shoehorned into the madcap blue and white webpage templates of Mr. Mark Zuckerberg! This is that reality! Let us live the adventure together, fearless Socialnauts!\n\nWhile this page is \"official\", it's here to be YOUR playground. Anyone can post here, so go crazy; we only ask that posts remain on-topic. If you're a purveyor of spam, smut, or unkindness, kindly die -- as you will be banned from this page. \n\nBy the way, you can also find Conan & Team Coco on other, similarly awesome corners of the internets:\n\nteamcoco.com\ntwitter.com/teamcoco\nteamcoco.tumbler.com\nyoutube.com/teamcoco\nfoursquare.com/teamcoco\nflickr.com/teamcoco\n\nToodles,\n\n- Your Pals \u0040 Team Coco",
"genre": "Comedy",
"network": "TBS",
"checkins": 3
}
But in that case, the link defines the url to the Facebook page.