This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#101 2011-07-19 10:05:52

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

Found a way around. I really hope this works, please try it with your projects:

My newest three projects:
http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=1http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=2http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=3

This can pull all of your projects by changing the parameter num. Here's the link with parameters:

Code:

[img]http://blocks.scratchr.org/API.php?user=USERNAME&action=projects&type=newest&return=image&num=NUM'TH PROJECT[/img]

http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#102 2011-07-19 10:08:23

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

Found a way around. I really hope this works, please try it with your projects:

My newest three projects:
http://blocks.scratchr.org/API.php?user … &num=1http://blocks.scratchr.org/API.php?user … &num=2http://blocks.scratchr.org/API.php?user … &num=3

This can pull all of your projects by changing the parameter num. Here's the link with parameters:

Code:

[url]http://blocks.scratchr.org/API.php?user=USERNAME&action=projects&type=newest&return=image&num=NUM'TH PROJECT[/url]

http://blocks.scratchr.org/API.php?user=SeptimusHeap&action=projects&type=newest&return=image&num=1

EDIT: Nope  sad

Last edited by SeptimusHeap (2011-07-19 10:08:36)


http://i46.tinypic.com/dw7zft.png

Offline

 

#103 2011-07-19 10:08:45

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

ummm... That's not worked.... curses!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#104 2011-07-19 10:09:55

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: My new online/offline API for the fora

Not showing. D:

Offline

 

#105 2011-07-19 10:09:57

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

The thing is that it SHOULD work... if you view the link it's got the file echoed on the page....


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#106 2011-07-19 10:10:51

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

The thing is that it SHOULD work... if you view the link it's got the file echoed on the page....

And I can drag the text like an unloaded image...


http://i46.tinypic.com/dw7zft.png

Offline

 

#107 2011-07-19 10:12:23

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

Yes.... this is most unfortunate, It gets the project id by searching for project id (num) on the getprojectsbyusername page. The thumbnails always have the same thumb ID as the project...


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#108 2011-07-19 10:13:45

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

If I enter an invalid image such as http://scratch.mit.edu/static/projects/sparks/2721395_sm.png (http://scratch.mit.edu/static/projects/sparks/2721395_sm.png) I get a little cat but I can't read what it says...

So as the Image content is showing on the page, and even the cat drawing does not appear, it seems there is a display problem..

Last edited by sparks (2011-07-19 10:14:40)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#109 2011-07-19 10:17:15

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

WOOOOOOOOOOOOOOOOOOOOOOOO!!!!!! There was a stray 0! It works!

Last edited by sparks (2011-07-19 10:18:18)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#110 2011-07-19 10:23:08

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

If I enter an invalid image such as http://scratch.mit.edu/static/projects/ … 395_sm.png (http://scratch.mit.edu/static/projects/sparks/2721395_sm.png) I get a little cat but I can't read what it says...

So as the Image content is showing on the page, and even the cat drawing does not appear, it seems there is a display problem..

Try the full size version of it.  tongue
http://scratch.mit.edu/static/projects/sparks/2721395_med.png

Great!!  big_smile   big_smile   big_smile   big_smile

Offline

 

#111 2011-07-19 10:24:45

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=1http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=2http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=3http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=4http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=5http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=6http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=7http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=8http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=9http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=10http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=11http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=12

Oddly it does not seem to like doing it for anything above the 9th project....

EDIT: Oh. Projects made before 1000000 project was reached have 6 characters, not 7.

Last edited by sparks (2011-07-19 10:30:01)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#112 2011-07-19 10:29:57

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: My new online/offline API for the fora

What's on line 53 of your code?

Offline

 

#113 2011-07-19 10:30:40

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

53 echoes the image. The error you see is caused by the image not being found. I'm working on a fix now.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#114 2011-07-19 10:52:08

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

Is it worth me working out how to get projects from before the 1000000 change to show?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#115 2011-07-19 10:55:29

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

Is it worth me working out how to get projects from before the 1000000 change to show?

Probably.
Just have it scan for the next double quote.  wink

Offline

 

#116 2011-07-19 11:01:59

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

Is it worth me working out how to get projects from before the 1000000 change to show?

Yes


http://i46.tinypic.com/dw7zft.png

Offline

 

#117 2011-07-19 11:05:18

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

Alright... I'll see what I can do!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#118 2011-07-19 11:05:48

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

Alright... I'll see what I can do!

Dang it! I just realized I can't outline the image in greeness D: I wish i could put an image above and below it to make it part of my banner.

Last edited by SeptimusHeap (2011-07-19 11:06:13)


http://i46.tinypic.com/dw7zft.png

Offline

 

#119 2011-07-19 11:14:49

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

Done! I'm documenting the new API on a better named thead  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#120 2011-07-19 11:16:18

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

Done! I'm documenting the new API on a better named thead  smile

Keep all your apis in a Sparks: Epic APIs thread  tongue


http://i46.tinypic.com/dw7zft.png

Offline

 

#121 2011-07-19 11:20:09

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: My new online/offline API for the fora

SeptimusHeap wrote:

sparks wrote:

Done! I'm documenting the new API on a better named thead  smile

Keep all your APIs in a Sparks: Epic APIs thread  tongue

Grammar cop alert!  tongue

Works well, sparks.  big_smile

Offline

 

#122 2011-07-19 11:20:48

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

I'm calling it forum API. Too undramatic for your tastes, sep?  tongue

It is a little unfortunate that you can't layer or border images... It's probably possible, I mean, TheSuccessor built http://theblocklibrary.site11.com/include/img/blocks/specparser.php?spec=this%20system%20where%20text%20can%20be%20displayed%20on%20blocks!&type=stack&color=looks. Bordering would probably require something similar but that's out of my depth.

Last edited by sparks (2011-07-19 11:21:43)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#123 2011-07-19 11:21:19

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: My new online/offline API for the fora

Can it do links/titles? :3

Offline

 

#124 2011-07-19 11:22:16

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: My new online/offline API for the fora

Links yes, titles not for a while if ever as it's changing text...


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#125 2011-07-19 11:23:06

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: My new online/offline API for the fora

sparks wrote:

I'm calling it forum API. Too undramatic for your tastes, sep?  tongue

It is a little unfortunate that you can't layer or border images... It's probably possible, I mean, TheSuccessor built http://theblocklibrary.site11.com/inclu … olor=looks. Bordering would probably require something similar but that's out of my depth.

Yeah  tongue

Lol, but if you make the title interesting it will get more views. Maybe... Hmm, how do I make APIs sound exciting...


http://i46.tinypic.com/dw7zft.png

Offline

 

Board footer