Jump to content




Change certain methods into their own category


11 replies to this topic

#1 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 March 2014 - 09:44 PM

Currently, for items wrapped as peripherals,w e categorize those methods exposed as an API. I think for clarity, we should have a different category which would be Methods, or Exposed Methods for Peripherals.
I'm not sure how difficult this is, but I think it would clarify things such as the Monitor API, the CommandBlock API, and several others that aren't really APIs.

#2 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 25 March 2014 - 10:22 PM

I do agree, it wouldn't be at all hard. The hardest part would be deciding what to call it really. If we come up with a name I could probably do it in a few minutes.

#3 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 25 March 2014 - 10:49 PM

Well, it is a kind of API that the peripheral exposes. Better distinctions would certainly be nice to have. Perhaps call them Peripheral APIs?

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 26 March 2014 - 12:00 AM

That's already how they're categorised. :)

http://www.computerc...Peripheral_APIs

Edited by Bomb Bloke, 26 March 2014 - 12:00 AM.


#5 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 26 March 2014 - 12:12 AM

So perhaps the solution is to migrate the pages to have the suffix "(Peripheral API)" instead of "(API)". They're already clearly in the correct category.

#6 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 26 March 2014 - 12:14 AM

That would make sense. Some are probably categorised as just an API or both, however. I'll go through and change it later today if no one else has done it by then.

#7 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 26 March 2014 - 03:31 AM

I think we should keep the old links, eg: http://computercraft...ki/Printer_(API) as redirect pages however, that way links don't get broken.

#8 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 26 March 2014 - 05:11 AM

I don't really like having redirect pages around.

To be honest, I'm kind of re-thinking this. I don't think we particularly gain anything by changing the suffix of the page. Broken links (as few as they would be) suck, redirect pages suck. I think the page naming scheme is good as it is, and that the categorization of the page (which is already correct) is more important.

What these pages do need, however, is a better and more consistent notice that the API documented on the page is for use with a peripheral. Let's try leaving the pages where they were at, no renaming, but put together a template that we can put at the top of each of the pages that makes it explicitly clear that the API needs to be used with a peripheral, either via wrapping it (as the example shows) or via peripheral.call. We should probably also standardize the page appearances, as there is a wide variety of layouts between even the four pages we do have in that category.

#9 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 26 March 2014 - 07:23 AM

Done.
http://www.computerc...wiki/Modem_(API)

If another peripheral API appears, use {{PeripheralAPI}}.

Edited by oeed, 26 March 2014 - 07:24 AM.


#10 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 26 March 2014 - 09:25 PM

I can see the concern of lots of redirect pages making a mess, but really, they are better than broken links that new users will click on and get a 404, and then not have the slightest clue what to do. I think we should use them for future page renaming, but Lyqyd is right, and I'm quite happy with the template oeed made.

EDIT: I accidentally put the template and category on the page, realized that the page links to the Term API, reverted it. I do think there has to be some instruction on the term api page though on how to use the monitors.

Edited by awsmazinggenius, 26 March 2014 - 09:32 PM.


#11 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 26 March 2014 - 10:11 PM

View Postawsmazinggenius, on 26 March 2014 - 09:25 PM, said:

EDIT: I accidentally put the template and category on the page, realized that the page links to the Term API, reverted it. I do think there has to be some instruction on the term api page though on how to use the monitors.

What do you mean? As is redirecting the term to the monitor?

#12 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 26 March 2014 - 10:30 PM

No, just a little notice at the top of the page saying "To use a monitor, wrap it with monitor = peripheral.wrap("side")and replace term with monitor.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users