soundcloud

package
v1.54.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2022 License: OSL-3.0 Imports: 8 Imported by: 2

README

SoundCloud

Android client

com.soundcloud.android

Install system certificate.

How to get client_id

First, make a request like this:

GET / HTTP/2
Host: m.soundcloud.com

In the HTML response, you should see something like this:

"clientId":"iZIs9mchVcX5lhVRyQGGAYlNPVldzAoX"

The client_id seems to last at least a year:

https://github.com/rrosajp/soundcloud-archive/commit/c02809dc

Image

artworks:

https://soundcloud.com/oembed?format=json&url=https://soundcloud.com/western_vinyl/jessica-risker-cut-my-hair
https://i1.sndcdn.com/artworks-000308141235-7ep8lo-t500x.jpg

avatars:

https://soundcloud.com/oembed?format=json&url=https://soundcloud.com/pdis_inpartmaint/harold-budd-perhaps-moss
https://i1.sndcdn.com/avatars-000274827119-0dxutu-t500x.jpg

Why does this exist?

January 28 2022.

I use the site myself.

https://soundcloud.com/afterhour-sounds/premiere-ele-bisu-caradamom-coffee

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Images = []Image{
	{Size: "t120x120"},
	{Size: "t1240x260", Crop: true},
	{Size: "t200x200"},
	{Size: "t20x20"},
	{Size: "t240x240"},
	{Size: "t2480x520", Crop: true},
	{Size: "t250x250"},
	{Size: "t300x300"},
	{Size: "t40x40"},
	{Size: "t47x47"},
	{Size: "t500x"},
	{Size: "t500x500"},
	{Size: "t50x50"},
	{Size: "t60x60"},
	{Size: "t67x67"},
	{Size: "t80x80"},
	{Size: "tx250"},
}

Functions

This section is empty.

Types

type Image added in v1.48.1

type Image struct {
	Size string
	Crop bool
}

type Media

type Media struct {
	// cf-media.sndcdn.com/QaV7QR1lxpc6.128.mp3?Policy=eyJTdGF0ZW1lbnQiOlt7IlJ...
	URL string
}

func (Media) Ext added in v1.49.7

func (m Media) Ext() (string, error)

type Track

type Track struct {
	ID           int64
	Display_Date string // 2021-04-12T07:00:01Z
	User         struct {
		Username   string
		Avatar_URL string
	}
	Title       string
	Artwork_URL string
	Media       struct {
		Transcodings []struct {
			Format struct {
				Protocol string
			}
			URL string
		}
	}
}

func NewTrack added in v1.25.1

func NewTrack(id int64) (*Track, error)

func Resolve added in v1.26.8

func Resolve(addr string) ([]Track, error)

func User_Tracks added in v1.54.5

func User_Tracks(id int64) ([]Track, error)

We can also paginate, but for now this is good enough.

func (Track) Artwork added in v1.47.9

func (t Track) Artwork() string

i1.sndcdn.com/artworks-000308141235-7ep8lo-large.jpg

func (Track) Base added in v1.49.7

func (t Track) Base() string

func (Track) Progressive added in v1.40.8

func (t Track) Progressive() (*Media, error)

Also available is "hls", but all transcodings are quality "sq". Same for "api-mobile.soundcloud.com".

func (Track) String added in v1.51.1

func (t Track) String() string

func (Track) Time added in v1.51.1

func (t Track) Time() (time.Time, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL