Re: [MBS] WindowsDiskChangeMBS and WindowsDriveNotificationMBS questions

2020-01-20 Thread Christian Schmitz


> Then, on the other hand, WindowsDiskChangeMBS will never have something more 
> interesting than WindowsDriveNotificationMBS, right?

I am not sure.
I feel like I implemented the same thing twice with a 2 year distance...

> And, for my other question, does “media” stand for “volume” and “drive” for 
> “disk”, in windows-to-mac translation for this class?

Yes, I would assume that matches.


Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] WindowsDiskChangeMBS and WindowsDriveNotificationMBS questions

2020-01-20 Thread Marnaud

> Le 20 janv. 2020 à 17:14, Christian Schmitz  
> a écrit:
> 
> Well, different layers involved.
> 
> WindowsDriveNotificationMBS is on OS level while WindowsDiskChangeMBS is a 
> notification from Shell.
> 
> Not sure if that difference ever makes a difference.
> Expect maybe a Windows server without GUI.

Thanks, makes sense.
Then, on the other hand, WindowsDiskChangeMBS will never have something more 
interesting than WindowsDriveNotificationMBS, right?

And, for my other question, does “media” stand for “volume” and “drive” for 
“disk”, in windows-to-mac translation for this class?
___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] WindowsDiskChangeMBS and WindowsDriveNotificationMBS questions

2020-01-20 Thread Christian Schmitz



> Am 20.01.2020 um 16:50 schrieb Marnaud :
> 
> Hello,
> 
> For WindowsDriveNotificationMBS, it looks like they are already covered by 
> the WindowsDiskChangeMBS class (unless it's a third type of media involved?). 
> What does it offer more than the other?

Well, different layers involved.

WindowsDriveNotificationMBS is on OS level while WindowsDiskChangeMBS is a 
notification from Shell.

Not sure if that difference ever makes a difference.
Expect maybe a Windows server without GUI.

Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] NavigationDialogMBS replacement?

2020-01-20 Thread Marnaud

> Le 20 janv. 2020 à 16:05, Christian Schmitz  
> a écrit:
> 
>> Isn't it confusing for some people that the documentation lists all current 
>> items even when the user might be using an earlier version? 
> 
> This sounds like something we could look into, but as Xojo Inc. doesn't do it 
> for their versions, I don't expect people expect it in general.

For Xojo, since I sometimes use older versions, I usually choose the offline 
(local) version. Since the online version is always for the latest IDE and it 
requires an Internet connection (often not getting an immediate reply, also), I 
don't see much reason to connect around the world to read something unrelated 
to my product if the local version is better.

> You can always refer to the PDF or html files of the specific version.

For MBS, there can't be a “built-in” window like Xojo (at least, I guess). If 
it were the case, I'd happily browse a MBS local documentation from within the 
IDE. However, looking for the MBS documentation file on my hard disks is harder 
(I actually have never bothered with other folders than the one containing the 
plugin files).

>> Indeed, both are useful. If “Files” was a property rather than a method, I 
>> guess the former version (“Files(index as integer) as FolderItem”) would be 
>> useless (one would do “f=o.Files(0)” with the array); only one version would 
>> be needed, then. I'm wrong?
> 
> In plugin interface you can't have properties with arrays inside. Sorry.

Ah, I always wondered why various calls in your plugin were made that way 
(using methods). I thought it was just your choice, a preference. Glad I was 
wrong.
___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] NavigationDialogMBS replacement?

2020-01-20 Thread Christian Schmitz


> Isn't it confusing for some people that the documentation lists all current 
> items even when the user might be using an earlier version? 

This sounds like something we could look into, but as Xojo Inc. doesn't do it 
for their versions, I don't expect people expect it in general.

You can always refer to the PDF or html files of the specific version.

> Indeed, both are useful. If “Files” was a property rather than a method, I 
> guess the former version (“Files(index as integer) as FolderItem”) would be 
> useless (one would do “f=o.Files(0)” with the array); only one version would 
> be needed, then. I'm wrong?

In plugin interface you can't have properties with arrays inside. Sorry.

Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Debugging CURLSMBS calls

2020-01-20 Thread Christian Schmitz



> Am 20.01.2020 um 09:17 schrieb Maximilian Tyrtania :
> 
> I 'm creating a Zoom-API-Wrapper class and I'm using the CURLSMBS class for 
> the actual call and it's coming along quite well. There is one call however I 
> can't seem to get to work (I always get error 405 method not allowed):
> This is the contructor of my custom CURLSMBS-class. I don't believe there is 
> anything wrong with it as all other calls (create /delete User) succeed.
> 
> Public Sub constructor()
>  headerArray.Append "Accept-Encoding: gzip, deflate"

Better use option:
c.OptionAcceptEncoding = "gzip"

This way CURL automatically decompresses it for you.

>  Me.OptionCustomRequest = "PATCH" //this might be the culprit as the error 
> says Allow: GET, POST

Okay.

>  Me.OptionPostFields = fields

Okay. So a POST labeled PATCH

>  Me.OptionPost = True

Not needed.

>  Var header As String=Me.HeaderData//contains 

What is DebugData?

I would like to know whether you send POST or PATCH.

Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Debugging CURLSMBS calls

2020-01-20 Thread Maximilian Tyrtania
I 'm creating a Zoom-API-Wrapper class and I'm using the CURLSMBS class for the 
actual call and it's coming along quite well. There is one call however I can't 
seem to get to work (I always get error 405 method not allowed):
This is the contructor of my custom CURLSMBS-class. I don't believe there is 
anything wrong with it as all other calls (create /delete User) succeed.

Public Sub constructor()
  
  Me.OptionVerbose = DebugBuild
  Me.CollectOutputData = True
  Me.OptionUserAgent = "JWT-Zoom-Client"
  Me.OptionFollowLocation = True
  Me.OptionMaxRedirs = 3
  
  Dim headerArray() As String
  headerArray.Append "content-type: application/json;charset=UTF-8"
  headerArray.Append "Accept: */*"
  headerArray.Append "Accept-Encoding: gzip, deflate"
  headerArray.Append "Cache-Control: no-cache"
  headerArray.Append "Connection: keep-alive"
  headerArray.Append "Authorization: Bearer "+ZoomStuff.JWT
  headerArray.Append "Host: api.zoom.us"
  
  Me.SetOptionHTTPHeader headerArray
End Sub

Here is the actual call:

Public Function updateUserAccountTypeForCoach(theUser as User, accountType as 
Integer) as string
  Dim result As String
  //see: 
https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate
  
  Me.OptionURL = "https://api.zoom.us/v2/users/"+theuser.zoom_id
  Me.OptionCustomRequest = "PATCH" //this might be the culprit as the error 
says Allow: GET, POST
  
  Var zoomUser As New JSONItem
  Var userInfo As New JSONItem
  userInfo.value("email")=theUser.email
  userInfo.value("type")=accountType
  userInfo.value("first_name")=theUser.firstname
  userInfo.value("last_name")=theUser.lastname
  zoomUser.Value("user_info")=userInfo
  zoomUser.Compact=True//kills white spaces
  
  Var fields As String=zoomUser.ToString
  Me.OptionPostFields = fields
  Me.OptionPost = True
  Var e As Integer=Me.Perform
  Var callresult As String=Me.OutputData
  
  Var header As String=Me.HeaderData//contains 

HTTP/1.1 405 
Date: Mon, 20 Jan 2020 07:58:28 GMT
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: ZOOM
x-zm-trackingid: WEB_491537273a503797930ffc4156d7d154
X-Content-Type-Options: nosniff
Cache-Control: no-cache, no-store, must-revalidate, no-transform
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: cred=1306A2875ACFCF07FFF20EDE5B4657B7; Path=/; Secure; HttpOnly
Allow: GET, POST
Set-Cookie: _zm_currency=EUR; Domain=.zoom.us; Expires=Tue, 21-Jan-2020 
07:58:28 GMT; Path=/; Secure
Set-Cookie: _zm_mtk_guid=a5370539c5c046bb9eed0313d0517c0c; Domain=.zoom.us; 
Path=/; Secure
Content-Language: en-US

  If e<>0 Or header.contains("204")=False Then//
Return result+" Error code is:"+e.ToString+"Zoom-Error is 
"+header+EndOfLine+callresult
  Else
Return callresult
  End If
  
  return result
End Function

The thing is, If I execute this from the terminal:

curl --request PATCH \
| =>   --url https://api.zoom.us/v2/users/someUserID \
| =>   --header 'authorization: Bearer MyJWT...' \
| =>   --header 'content-type: application/json' \
| =>   --data 
'{"first_name":"Test","last_name":"Coach","type":"1","job_title":"string","company":"SomeCompany","location":"Berlin"}'

...it works just fine.

What would help me debug this if there was some way to see te actual command 
that the plugin issues. Is there?
Thanks,

Maximilian Tyrtania

___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info