Suggestion : New Soap Commands

Ideas and discussions on third party tools and utilities

Moderator: Forum Moderator

Post Reply
User avatar
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Suggestion : New Soap Commands

Post by Mutt-Li » Mon Jan 24, 2011 8:05 am

Due to the ease at adding resources to the wrong planets, Accidently De-spawning the Wrong Ones, I think the following Commands could be usefull

GetAvailability(ID,Server,Login,ProgrameInfo) Return an integer as a mask of available planets
RemoveAvailability(ID,Server,Planet,Login,ProgrameInfo) Remove from 1 planet only
Respawn(ID,Server,Login,ProgrameInfo) Respawn a recently despawned resource

User avatar
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: Suggestion : New Soap Commands

Post by Mutt-Li » Mon Jan 24, 2011 9:53 am

Since its possible to add resources to the wrong server/galaxy

RemoveFromServer(ID,Server,Login,ProgramInfo)

this would only work if the userid matches the userid of the user who added the resource, to prevent malicious damage being done.

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Suggestion : New Soap Commands

Post by Sobuno » Mon Jan 24, 2011 4:24 pm

The functionality that GetAvailability would provide is already provided by GetResourceInfoFromID (And GetResourceInfo for the name/server-based version) as this method returns various information about the resource, one of these being an array of planets on which the resource is available.

The functionality provided by Respawn is also somewhat provided by SoapAddAvailability through Status Code 1: "Already exists on choosen server/planet, availability might be updated" - Meaning that if the resource was unavailable, it is now available again.

Is it intentional that you want the input to contain both an ID and the server? Or by ID, do you mean the name of the resource? In the case of ID meaning the numerical ID, the serverid is not necessary.

RemoveFromServer and RemoveAvailability seem fair enough, both only working if the userid matches whatever is in the database (Or if the user is a mod/admin... maybe)

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Suggestion : New Soap Commands

Post by Sobuno » Mon Jan 24, 2011 4:27 pm

Ignore my comment regarding GetAvailability, it seems that info is only available through the exported data files at the moment.

User avatar
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: Suggestion : New Soap Commands

Post by Mutt-Li » Mon Jan 24, 2011 8:11 pm

In all these i put ID as the ID of the Resource
Server would be the Server ID as used by the other Soap Commands

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Suggestion : New Soap Commands

Post by Sobuno » Mon Jan 24, 2011 9:18 pm

Mutt-Li wrote:In all these i put ID as the ID of the Resource
Server would be the Server ID as used by the other Soap Commands
Why have both then? The numerical ID used by resources is unique across all servers. Thus any given ID only matches one name/server combination and vice versa (Well, except for a few (3-4) exceptions resulting from me being stupid back in 2007)

User avatar
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: Suggestion : New Soap Commands

Post by Mutt-Li » Tue Jan 25, 2011 2:51 am

Just having the Resource ID would be better, I put the Serverid in cause i didnt know it wasnt needed
just like the AddAvailability Command has both of them

Suggested commands edited to

GetAvailability(ResourceID,Login,ProgrameInfo) Return an integer as a mask of available planets
RemoveAvailability(ResourceID,Planet,Login,ProgrameInfo) Remove from 1 planet only
Respawn(ResourceID,Login,ProgrameInfo) Respawn a recently despawned resource

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Suggestion : New Soap Commands

Post by Sobuno » Tue Jan 25, 2011 9:57 am

Hmm, you are right, I wonder why I did it that way as it is totally unnecessary info :S

I'll look into implementing the others later this week, maybe tonight if my course work doesn't take too long.

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Suggestion : New Soap Commands

Post by Sobuno » Wed Jan 26, 2011 5:08 pm

SoapRespawn should be available now

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Suggestion : New Soap Commands

Post by Sobuno » Mon Jan 31, 2011 4:18 pm

SoapRemoveAvailability should now be available, it uses the same input structure as SoapAddAvailability (ResourceID, Server, Planet, etc.).

(Taking some time as I had to convert the internal workings of SWGCraft to use the new underlying functions too... Wouldn't want a discrepancy sometime in the future)

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Suggestion : New Soap Commands

Post by Zimoon » Mon Jan 31, 2011 11:27 pm

Me taking notes for the SWGAide-backlog, the remove-thingie seems nice :)

Zim

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Suggestion : New Soap Commands

Post by Sobuno » Mon Jan 31, 2011 11:46 pm

Zimoon wrote:Me taking notes for the SWGAide-backlog, the remove-thingie seems nice :)

Zim
You may want to start using the ProgramInfo array now that others are using the SOAP methods too. I just enabled logging for programs today so that programs using SOAP will show up as 'SOAP:ProgramName:ProgramVersion' instead of just 'SOAP' in our logs, provided the program gives us the information of course.

It also allows us to ban a program in the case that it has run amok. And before anyone gets any crazy ideas about us then being able to prevent a program from communicating with the site, know that the program could just change one character in their ProgramName or their ProgramVersion and they would no longer be banned. The only (semi-)reliable way we can ban people is by IP-address, and that information is automatically given whenever you visit a website (Though we only store IP-addresses for your initial registration and for your posts).

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Suggestion : New Soap Commands

Post by Zimoon » Tue Feb 01, 2011 10:08 pm

I will look into it, time is limited but... :)
Z

User avatar
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: Suggestion : New Soap Commands

Post by Mutt-Li » Sat Feb 05, 2011 8:00 pm

I have Implemented SoapRemoveAvailability into my Scanner, and it appears to be working Correctly

My scanner will be publicly Released in a few days, I really need to get some Docs Done for it
unfortunately Setting it up is a little tricky

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests