From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aleksandr Vityazev Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: srht Date: Fri, 20 May 2022 18:39:29 +0000 Message-ID: <87ee0ot5em.fsf@posteo.org> References: <87ilq1tep7.fsf@posteo.org> <87h75k1zu3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29862"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 20 21:05:33 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ns7wL-0007aU-3a for ged-emacs-devel@m.gmane-mx.org; Fri, 20 May 2022 21:05:33 +0200 Original-Received: from localhost ([::1]:57272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ns7wJ-0007H2-VH for ged-emacs-devel@m.gmane-mx.org; Fri, 20 May 2022 15:05:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns7XH-0007OO-Pq for emacs-devel@gnu.org; Fri, 20 May 2022 14:39:39 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:42425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns7XF-0001gz-Mj for emacs-devel@gnu.org; Fri, 20 May 2022 14:39:39 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 893CC240027 for ; Fri, 20 May 2022 20:39:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1653071975; bh=31s5fxN04KiqZ2p2TJDWjQkoZUgQmpLw60pXvad8JOc=; h=From:To:Cc:Subject:Date:From; b=W/KWHVKXmHkqF9wQbhVqcfgunHsXMGsKKtaEfG6BTfGYpr92LpwiNK0ILjgp2+In1 d3m6vZdzOGEECEE1oZmkSG1gy40KtgUpx9rTEA60vvRBDtc4e/BKh111H2+gMCjKCw N1L0DpPNV89aSwnEcHWGT4Gj5f5zcyA3srcERuXig2IAggC2J81owyK+aZBmkvsyCg s6J/C/PiJ13pfGl37C9YOipW5yc+e9j1nwEEq1/2caAn4OT1XJamcpLMwJMPHkxUiJ jUPpjXuelffiU1JIiC2GuLa35tXU+tXt73Mw4gMlX52u66GALqT4dvNfcg2C9bd79a CPB8MijLzqZhg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4L4b9f0jkFz6tm4; Fri, 20 May 2022 20:39:33 +0200 (CEST) In-Reply-To: <87h75k1zu3.fsf@gnu.org> (Tassilo Horn's message of "Fri, 20 May 2022 08:05:40 +0200") Received-SPF: pass client-ip=185.67.36.65; envelope-from=avityazev@posteo.org; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 20 May 2022 15:04:29 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290012 Archived-At: Hi Tassilo, On 2022-05-20, 08:05 +0200, Tassilo Horn wrote: > Aleksandr Vityazev writes: > > Hi Aleksandr, > >>> Oh, I finally made it! It seems you cannot use an OAuth 2.0 token >>> but must use a legacy one. I'm not sure whose fault that is. I use >>> a sr.ht OAuth 2.0 token in hut (the command line client for sr.ht) >>> without issues. I think that uses the same REST/GraphQL APIs. >> >> Sourcehut REST API does not support OAuth2 [1], also worth clarifying. >> I don't use hut, but after looking a bit, I can tell that only GraphQl >> with API2.0 is used there. There is a GraphQl library for Emacs, but >> unfortunately neither elpa nor non-gnu elpa has it. > > Isn't it a bit unfortunate that this new package starts by using the > REST APIs which are described as legacy already and superseeded by the > GraphQL APIs (which are, confessedly, not yet complete for all > services)? I think the REST APIs will be functional in the mid-term > future, but... Yes, that's right, in the long run choosing GraphQl implementation would be the right thing to do. However, I'm hardly familiar with GraphQl. I don't think I'll switch to a redesign right now, I'll finish with the REST API first and then we'll see. > And is GraphQL really so different to REST? I've never used the former > but at a cursory glance I have the impression that they are quite > similar just that the former is "GraphQL query in, JSON out" whereas the > latter is "JSON in, JSON out". Is that wrong? Yes, that's true and yes they are different and in my opinion drastically different, although I haven't had to fully explore it yet, I could be wrong. -- Best regards, Aleksandr Vityazev