<?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: Problem with Hotmart API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3122433#M41661</link>
    <description>&lt;P&gt;Essa função é só pra gerar o token...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fiz uma segunda função pra gerar as tabelas e outra pra paginação.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Segue os nomes que usei pra vc entender a função:&lt;/P&gt;&lt;P&gt;Função para gerar token: getAuth&lt;/P&gt;&lt;P&gt;Função para gerar dados: getSales&lt;/P&gt;&lt;P&gt;Função da paginação: paginationSales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Função para gerar a tabela:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(optional request as text) =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;request = if request is null then&lt;BR /&gt;Json.Document(&lt;BR /&gt;Web.Contents&lt;BR /&gt;("&lt;A href="https://developers.hotmart.com/payments/api/v1/sales/history" target="_blank"&gt;https://developers.hotmart.com/payments/api/v1/sales/history&lt;/A&gt;",&lt;BR /&gt;[Query = [start_date = "1622505600000"],&lt;BR /&gt;Headers =[Authorization = getAuth()]]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;else&lt;BR /&gt;Json.Document(&lt;BR /&gt;Web.Contents&lt;BR /&gt;("&lt;A href="https://developers.hotmart.com/payments/api/v1/sales/history" target="_blank"&gt;https://developers.hotmart.com/payments/api/v1/sales/history&lt;/A&gt;",&lt;BR /&gt;[Query = [start_date = "1622505600000", page_token=request],&lt;BR /&gt;Headers = [Authorization = getAuth()]]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;in&lt;BR /&gt;request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Função para paginação:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(optional resource as text , optional results as list) as list =&amp;gt;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;currentResponse = requestSales(resource),&lt;BR /&gt;token = try currentResponse [page_info][next_page_token] otherwise 0,&lt;BR /&gt;currentResults = if results is null then {currentResponse[items]} else List.Combine({results, {currentResponse[items]}}),&lt;BR /&gt;output = if token = 0 then&lt;BR /&gt;currentResults&lt;BR /&gt;else&lt;BR /&gt;@paginationSales (token, currentResults)&lt;BR /&gt;in&lt;BR /&gt;output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2023 19:59:55 GMT</pubDate>
    <dc:creator>ClaudiaRocha</dc:creator>
    <dc:date>2023-03-09T19:59:55Z</dc:date>
    <item>
      <title>Problem with Hotmart API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3067820#M41090</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BIUser22_0-1675831990648.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/868093iD4C43FEE7A6C52E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BIUser22_0-1675831990648.png" alt="BIUser22_0-1675831990648.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hello guys, this is my code and when i apply, appear this error &amp;gt;&amp;nbsp;unable to authenticate with the credentials provided. Try again&lt;BR /&gt;&lt;BR /&gt;What i can do to solve?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 04:55:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3067820#M41090</guid>
      <dc:creator>BIUser22</dc:creator>
      <dc:date>2023-02-08T04:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Hotmart API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3069118#M41115</link>
      <description>&lt;P&gt;Eu fiz praticamente igual a você e deu certo. Veja se os dados não estão errados.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inicialmente não fiz como função, mas ao fazer a request e a paginação, vimos a necessidade de fazer como função. Agora meu desafio está em fazer a atualização funcionar no Power BI Web.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="getauth hotmart.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/868482i45E7A732EF0E7C0F/image-size/large?v=v2&amp;amp;px=999" role="button" title="getauth hotmart.jpg" alt="getauth hotmart.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 13:51:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3069118#M41115</guid>
      <dc:creator>ClaudiaRocha</dc:creator>
      <dc:date>2023-02-08T13:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Hotmart API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3069691#M41124</link>
      <description>&lt;P&gt;Refiz o código e ele funcionou, não faço ideia do que aconteceu&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 16:44:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3069691#M41124</guid>
      <dc:creator>Ronaldouououo</dc:creator>
      <dc:date>2023-02-08T16:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Hotmart API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3085752#M41304</link>
      <description>&lt;P&gt;Você conseguiu puxar algum tipo de tabela com este código? não estou conseguindo&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 22:14:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3085752#M41304</guid>
      <dc:creator>BIUser22232</dc:creator>
      <dc:date>2023-02-17T22:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Hotmart API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3122433#M41661</link>
      <description>&lt;P&gt;Essa função é só pra gerar o token...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fiz uma segunda função pra gerar as tabelas e outra pra paginação.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Segue os nomes que usei pra vc entender a função:&lt;/P&gt;&lt;P&gt;Função para gerar token: getAuth&lt;/P&gt;&lt;P&gt;Função para gerar dados: getSales&lt;/P&gt;&lt;P&gt;Função da paginação: paginationSales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Função para gerar a tabela:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(optional request as text) =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;request = if request is null then&lt;BR /&gt;Json.Document(&lt;BR /&gt;Web.Contents&lt;BR /&gt;("&lt;A href="https://developers.hotmart.com/payments/api/v1/sales/history" target="_blank"&gt;https://developers.hotmart.com/payments/api/v1/sales/history&lt;/A&gt;",&lt;BR /&gt;[Query = [start_date = "1622505600000"],&lt;BR /&gt;Headers =[Authorization = getAuth()]]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;else&lt;BR /&gt;Json.Document(&lt;BR /&gt;Web.Contents&lt;BR /&gt;("&lt;A href="https://developers.hotmart.com/payments/api/v1/sales/history" target="_blank"&gt;https://developers.hotmart.com/payments/api/v1/sales/history&lt;/A&gt;",&lt;BR /&gt;[Query = [start_date = "1622505600000", page_token=request],&lt;BR /&gt;Headers = [Authorization = getAuth()]]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;in&lt;BR /&gt;request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Função para paginação:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(optional resource as text , optional results as list) as list =&amp;gt;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;currentResponse = requestSales(resource),&lt;BR /&gt;token = try currentResponse [page_info][next_page_token] otherwise 0,&lt;BR /&gt;currentResults = if results is null then {currentResponse[items]} else List.Combine({results, {currentResponse[items]}}),&lt;BR /&gt;output = if token = 0 then&lt;BR /&gt;currentResults&lt;BR /&gt;else&lt;BR /&gt;@paginationSales (token, currentResults)&lt;BR /&gt;in&lt;BR /&gt;output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 19:59:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3122433#M41661</guid>
      <dc:creator>ClaudiaRocha</dc:creator>
      <dc:date>2023-03-09T19:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Hotmart API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3211387#M42434</link>
      <description>&lt;P&gt;Olá Cláudia, tentei rodar esse código de paginação, mas meu power bi retornou que não reconhece o requestSales. Pode me ajudar?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 14:40:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3211387#M42434</guid>
      <dc:creator>laris-amaral</dc:creator>
      <dc:date>2023-04-28T14:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Hotmart API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3799743#M51175</link>
      <description>&lt;P&gt;Estou tentando gerar o token e acaba dando este erro abaixo. Aconteceu com alguem?&lt;BR /&gt;&lt;BR /&gt;Erro na consulta ‘’. DataSource.Error: Há suporte para Web.Contents com a opção Content somente durante uma conexão anônima.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 23:14:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Hotmart-API/m-p/3799743#M51175</guid>
      <dc:creator>Edinei77</dc:creator>
      <dc:date>2024-03-29T23:14:42Z</dc:date>
    </item>
  </channel>
</rss>

