<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: where does the .size property come from in the code snippet for the ArcGIS API for Python User.items() method in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1042876#M5870</link>
    <description>&lt;P&gt;It's coming from the &lt;STRONG&gt;Item&lt;/STRONG&gt; class, but there do seem to be a number of properties there that are not fully documented in the API docs. Calling &lt;STRONG&gt;dir(Item)&lt;/STRONG&gt; on a Feature Layer, for instance, I see:&lt;/P&gt;&lt;PRE&gt;[&lt;BR /&gt;  ...&lt;BR /&gt;  'title',&lt;BR /&gt;  'type',&lt;BR /&gt;  'snippet',&lt;BR /&gt;  ...&lt;BR /&gt;]&lt;/PRE&gt;&lt;P&gt;And other properties not listed. Interestingly, the documentation for the &lt;STRONG&gt;Item.update()&lt;/STRONG&gt; method lists the various item properties that can be updated, and such properties &lt;EM&gt;are&lt;/EM&gt; listed there!&lt;/P&gt;&lt;P&gt;I've also noticed that the contents of &lt;STRONG&gt;dir(Item) &lt;/STRONG&gt;actually changes based on the item's type.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for i in gis.content.search('', max_items=-1):
    print(f'Length of dir: {len(dir(i))}    Type: {i.type}')&lt;/LI-CODE&gt;&lt;PRE&gt;Length of dir: 143    Type: PDF
Length of dir: 145    Type: Feature Service
Length of dir: 144    Type: Feature Service
Length of dir: 142    Type: Form
Length of dir: 142    Type: Web Map&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But that may be besides the point. The &lt;STRONG&gt;size &lt;/STRONG&gt;property does seem to be consistently present across item types. There &lt;EM&gt;have&lt;/EM&gt; been instances when the API docs just needed correcting.You could always submit a bug report at the Python API's GitHub repo.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 14:14:04 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-04-01T14:14:04Z</dc:date>
    <item>
      <title>where does the .size property come from in the code snippet for the ArcGIS API for Python User.items() method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1042513#M5863</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndresCastillo_0-1617295419080.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9871i32EE5638F2DD39B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndresCastillo_0-1617295419080.png" alt="AndresCastillo_0-1617295419080.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;maybe the .size property comes from the ArcGIS Rest API Users, groups, and items Item Resources, but if that were the case, shouldn't we access the "resources" key first, get the desired index, then calling the .size property rather than accessing the .size property directly?:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A title="https://developers.arcgis.com/rest/users-groups-and-items/item-resources.htm" href="https://developers.arcgis.com/rest/users-groups-and-items/item-resources.htm" target="_blank" rel="noreferrer noopener"&gt;https://developers.arcgis.com/rest/users-groups-and-items/item-resources.htm&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "total": &amp;lt;total number of resources on the item&amp;gt;,
  "start": &amp;lt;the first record index in the response&amp;gt;,
  "num": &amp;lt;the number of resources in the response&amp;gt;,
  "nextStart": &amp;lt;the next entry index&amp;gt;,
  "resources": [
    {
      "resource": "&amp;lt;resource1&amp;gt;",
      "created": &amp;lt;resource1 created datetime&amp;gt;,
      "size": &amp;lt;resource1 size&amp;gt;
    },
    {
      "resource": "&amp;lt;resource2&amp;gt;",
      "created": &amp;lt;resource2 created datetime&amp;gt;,
      "size": &amp;lt;resource2 size&amp;gt;
    },
    {
      "resource": "&amp;lt;resource3&amp;gt;",
      "created": &amp;lt;resource3 created datetime&amp;gt;,
      "size": &amp;lt;resource3 size&amp;gt;
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 16:43:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1042513#M5863</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2021-04-01T16:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: where does the .size property come from in the code snippet for the ArcGIS API for Python User.items() method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1042876#M5870</link>
      <description>&lt;P&gt;It's coming from the &lt;STRONG&gt;Item&lt;/STRONG&gt; class, but there do seem to be a number of properties there that are not fully documented in the API docs. Calling &lt;STRONG&gt;dir(Item)&lt;/STRONG&gt; on a Feature Layer, for instance, I see:&lt;/P&gt;&lt;PRE&gt;[&lt;BR /&gt;  ...&lt;BR /&gt;  'title',&lt;BR /&gt;  'type',&lt;BR /&gt;  'snippet',&lt;BR /&gt;  ...&lt;BR /&gt;]&lt;/PRE&gt;&lt;P&gt;And other properties not listed. Interestingly, the documentation for the &lt;STRONG&gt;Item.update()&lt;/STRONG&gt; method lists the various item properties that can be updated, and such properties &lt;EM&gt;are&lt;/EM&gt; listed there!&lt;/P&gt;&lt;P&gt;I've also noticed that the contents of &lt;STRONG&gt;dir(Item) &lt;/STRONG&gt;actually changes based on the item's type.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for i in gis.content.search('', max_items=-1):
    print(f'Length of dir: {len(dir(i))}    Type: {i.type}')&lt;/LI-CODE&gt;&lt;PRE&gt;Length of dir: 143    Type: PDF
Length of dir: 145    Type: Feature Service
Length of dir: 144    Type: Feature Service
Length of dir: 142    Type: Form
Length of dir: 142    Type: Web Map&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But that may be besides the point. The &lt;STRONG&gt;size &lt;/STRONG&gt;property does seem to be consistently present across item types. There &lt;EM&gt;have&lt;/EM&gt; been instances when the API docs just needed correcting.You could always submit a bug report at the Python API's GitHub repo.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 14:14:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1042876#M5870</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-01T14:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: where does the .size property come from in the code snippet for the ArcGIS API for Python User.items() method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1042965#M5872</link>
      <description>&lt;P&gt;Nice, thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&lt;/P&gt;&lt;P&gt;dot tab after item did not show in the docstring any size property, but like you said, dir() does:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndresCastillo_0-1617475200343.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10033i666AEAE893014DA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndresCastillo_0-1617475200343.png" alt="AndresCastillo_0-1617475200343.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Apr 2021 18:40:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1042965#M5872</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2021-04-03T18:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: where does the .size property come from in the code snippet for the ArcGIS API for Python User.items() method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1043541#M5877</link>
      <description>&lt;P&gt;Also just noticed that in the second for loop in the try block of the API code sample, it should be user.items(folder=f), not user.folders(folder=f).&lt;/P&gt;&lt;P&gt;The API does not have any folders method for any of the classes in the arcgis.gis module&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndresCastillo_0-1617398965882.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10025i6B85B7DF033787F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndresCastillo_0-1617398965882.png" alt="AndresCastillo_0-1617398965882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I will raise an issue in the API repo.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Apr 2021 18:33:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/where-does-the-size-property-come-from-in-the-code/m-p/1043541#M5877</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2021-04-03T18:33:42Z</dc:date>
    </item>
  </channel>
</rss>

