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.
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Change certain methods into their own category
Started by Cranium, 25 March 2014 - 08:44 PMPosted 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.
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.
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.
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?
Posted 26 March 2014 - 12:00 AM
That's already how they're categorised. :)/>
http://www.computercraft.info/wiki/Category:Peripheral_APIs
http://www.computercraft.info/wiki/Category:Peripheral_APIs
Edited on 25 March 2014 - 11:00 PM
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.
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.
Posted 26 March 2014 - 03:31 AM
I think we should keep the old links, eg: http://computercraft.info/wiki/Printer_(API) as redirect pages however, that way links don't get broken.
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.
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.
Posted 26 March 2014 - 07:23 AM
Done.
http://www.computerc...wiki/Modem_(API)
If another peripheral API appears, use {{PeripheralAPI}}.
http://www.computerc...wiki/Modem_(API)
If another peripheral API appears, use {{PeripheralAPI}}.
Edited on 26 March 2014 - 06:24 AM
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.
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 on 26 March 2014 - 08:32 PM
Posted 26 March 2014 - 10:11 PM
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?
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.