|
The Newsbin 5 series also supports this interface, although some of the commands supported are different to reflect the way that Newsbin 5 operates. It is also intended that Newsbin 5 will eventually support a much richer command set than the Newsbin 4.33 series.
With Newsbin 4.33 only a single connection could be opened, but with Newsbin 5 this restriction has been lifted.
Succesful commands have a 200 return. Errors have a 400 status return.
The easiest way to connect to this interface to see how it works is to:
TELNET 127.0.0.1 118" (without the quotes) and
press OK200 Newsbin Serverbeing displayed. At this point you can type in commands and see what happens.
| Command | Description | Newsbin Versions | |
|---|---|---|---|
| 4.33B6/B8 | 5 | ||
| BWL | Bandwidth Limiter | x | x |
| CLEAR | Clear Post List | x | |
| CLOSE | Close | x | |
| COMPRESS | Compress Spools | x | |
| FILE | Load File | x | x |
| GetSection | Get INI file section | x | |
| GetVar | Get INI file variable | x | |
| PAUSE | Pause Downloads | x | x |
| QUIT | Close Connection | x | x |
| SetVar | Set INI file variable | x | |
| START | Start Header Download | x | |
| STOP | Stop Header Download | x | |
| UPDATE | Update Headers | x | |
All commands return a response code followed by descriptive text. As far as the response codes are concerned, then anything 400 or higher is an error. Good results will range from 200-299 though only 200 is used today.
The following is a full list of the commands available in alphabetical order. Where a particular command is only available with specific version of Newsbin this is indicated. Any item that is enclosed in square brackets is optional. Items separated by the '|' character indicates alternatives. Items in italics are logical items (e.g. variable names).
Returns:
^
200 BW Limiter Off
Clearing Post list and Memory
Returns:
Gracefully shuts down Newsbin, saves any current download list and configuration changes
Returns:
^
COMPRESS | Newsbin 4.33B6/B8 only
|
Would allow external app to initiate auto compress at 4:00am or something.
Returns: DIR>200 Compress Started
Then proceeds to list progress i.e. Server: newserver - newsgroup" for each server and each
group that has any previously downloaded headers in the spool files.y downloaded headers in the spool files.
^
Provide a .nzb or .bns filename and path. NewsBin will parse and load into the Post List.
Returns:
^
GetSection section <section> | Newsbin 5 only
|
200 Section List Follows
contents of the section
.
GetSection Servers
might return data of the form:200 Section List Follows
NTLWorld
Astraweb
Astraweb_Europe
Giganews
Giganews2
Astraweb_Test
If you type an invalid section name, then the response will be:
401 GetSection - Section not Found
^GetVar section.name | Newsbin 5 only
|
Example:
Returns:
"Getvar nh:address"
With Newsbin 4 the files are paused immediately. With Newsbin 5 each download thread is paused when it completes the current chunk it is working on so it can be several seconds before the pause takes full effect..
Returns:
200 Download Paused
200 Download ResumedSAVE | Newsbin 5 only |
This would typically be used after using a series of SetVar commands to store or update values in the configuration file.
Returns:
200 Config SavedSetVar section:name:value | Newsbin 5 only |
Example: "SetVar nh:address:test.newshosting.com"
You aren't limited to existing sections either.
If you want to store your own variables in the NBI you can.
The format of the results is:
"Save"
"GetVar Itimpi:saveinterval"
GetVar will only return one result, setvar returns nothing but the response.
value1\r\n
value2\r\n
...
.\r\n
START | Newsbin 4.33B6/B8 only
|
Starts header download in manual mode or starts header and file download in automatic mode. Works on all groups in the group list with a check mark next to it.
Returns:
200 STARTSTOP | Newsbin 4.33B6/B8 only
|
Stops and header downloads that is in progress. Does notaffect any file downloads.
Returns:
200 StopUPDATE [groupname] | Newsbin 5 only
|
Updates the headers for all enabled groups if no groupname specified, and the specified group if groupname is given
Returns:
200 Header Update CommencingThe Newsbin TCP Interface is Copyright © 2004-2005 DJI Interprises, LLC. All rights reserved
| Date | Version | Changes |
|---|---|---|
| July 2005 | 1.0 | First Version |
| October 2005 | 1.1 | Major update following Newsbin 5.0 reaching General Release status |
|