Question

I am working with the MEGA api in PHP by smartinm which can be found here.

I can access the data fine but when I return a query I am getting an array with the below values.

           [0] => Array
            (
                [h] => no idea
                [p] => no idea
                [u] => no idea
                [t] => 0
                [a] => Array
                    (
                        [n] => file_name.txt
                        [c] => this_only_appears_in_images
                    )

                [k] => no idea
                [s] => no idea
                [ts] => no idea

As you can see I have no idea what h,p,u,t,a,k,s,ts are. I know 'n' is name and 'c' appears only when an image file is there. Does anyone know off-hand what each element stands for?

Thanks, Niall

Was it helpful?

Solution

h: The ID of the node ;
p: The ID of the parent node (directory) ;
u: The owner of the node ;
t: The type of the node:
    0: File
    1: Directory
    2: Special node: Root (“Cloud Drive”)
    3: Special node: Inbox
    4: Special node: Trash Bin
a: The attributes of the node. Currently only contains its name.
k: The key of the node (used to encrypt its content and its attributes) ;
s: The size of the node ;
ts: The time of the last modification of the node.

Source: http://julien-marchand.fr/blog/using-the-mega-api-with-php-examples/

OTHER TIPS

Is this what you were looking for?

The result contains, for each node, the the following information:

  • h: The ID of the node
  • p: The ID of the parent node (directory) ;
  • u: The owner of the node
  • t: The type of the node:
    • 0: File
    • 1: Directory
    • 2: Special node: Root (“Cloud Drive”)
    • 3: Special node: Inbox
    • 4: Special node: Trash Bin
  • a: The attributes of the node. Currently only contains its name.
  • k: The key of the node (used to encrypt its content and its attributes)
  • s: The size of the node
  • ts: The time of the last modification of the node.

Source

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top